So it is my time to come back with follow up. Having some time, I decided to implement a default language checker which comes back with names for both of worksets. It was rather tedious job, so please find it below. I haven't double-checked all of them, so please report if something is wrong :
string defaultLevelsAndGrids = "";
string defaultWorkset1 = "";
switch (app.Language.ToString())
{
case "Unknown":
defaultLevelsAndGrids = "Shared Levels and Grids";
defaultWorkset1 = "Workset1";
break;
case "English_USA":
defaultLevelsAndGrids = "Shared Levels and Grids";
defaultWorkset1 = "Workset1";
break;
case "German":
defaultLevelsAndGrids = "Gemeinsam genutzte Ebenen und Raster";
defaultWorkset1 = "Bearbeitungsbereich1";
break;
case "Spanish":
defaultLevelsAndGrids = "Niveles y rejillas compartidos";
defaultWorkset1 = "Subproyecto1";
break;
case "French":
defaultLevelsAndGrids = "Quadrillages et niveaux partagés";
defaultWorkset1 = "Sous-projet 1";
break;
case "Italian":
defaultLevelsAndGrids = "Griglie e livelli condivisi";
defaultWorkset1 = "Workset1";
break;
//case "Dutch":
//defaultLevelsAndGrids = "Shared Levels and Grids";
//defaultWorkset1 = "Workset1";
//break;
case "Chinese_Simplified":
defaultLevelsAndGrids = "共享标高和轴网";
defaultWorkset1 = "工作集1";
break;
case "Chinese_Traditional":
defaultLevelsAndGrids = "共用的樓層和網格";
defaultWorkset1 = "工作集 1";
break;
case "Japanese":
defaultLevelsAndGrids = "共有レベルと通芯";
defaultWorkset1 = "ワークセット1";
break;
case "Korean":
defaultLevelsAndGrids = "공유 레벨 및 그리드";
defaultWorkset1 = "작업세트1";
break;
case "Russian":
defaultLevelsAndGrids = "Общие уровни и сетки";
defaultWorkset1 = "Рабочий набор 1";
break;
case "Czech":
defaultLevelsAndGrids = "Sdílená podlaží a osnovy";
defaultWorkset1 = "Pracovní sada1";
break;
case "Polish":
defaultLevelsAndGrids = "Współdzielone poziomy i osie";
defaultWorkset1 = "Zadanie1";
break;
//case "Hungarian":
//defaultLevelsAndGrids = "Shared Levels and Grids";
//defaultWorkset1 = "Workset1";
//break;
case "Brazilian_Portuguese":
defaultLevelsAndGrids = "Níveis e eixos compartilhados";
defaultWorkset1 = "Workset1";
break;
case "English_GB":
defaultLevelsAndGrids = "Shared Levels and Grids";
defaultWorkset1 = "Workset1";
break;
default:
defaultLevelsAndGrids = "Shared Levels and Grids";
defaultWorkset1 = "Workset1";
break;
}
There is an "Unknown type" - I didn't know if I should add it (default in a switch would cover it). In the end, I left it in the code. What should we do to get this type from revit api?
There are some interesting findings in it. Firstly, we have two langagueType (hungarian and dutch) in Revit API. I couldn't find them in language help.
https://help.autodesk.com/view/RVT/2023/ENU/?guid=GUID-BD09C1B4-5520-475D-BE7E-773642EEBD6C
I assumed that those language versions are being developed, so for now I commented them out in the code.
Also, it is interesting that some translators decided to keep Workset1 as default - We have it not only in English but also in Italian and Brazilian Portuguese. I like this approach because in my opinion, Polish translation "Zadanie1" is rather bad and confusing (it means something closer to "task"). Because of that I saw some projects where worksets were named "Tasks of Adam", "Tasks of Kate" etc.
The other interesting thing is lack of consistency regarding number "1". In most languages we don't have extra space between Workset and 1, but in Russian, French and traditional Chinese with have. Chinese is double interesting because in simplified Chinese we don't have empty space.