Dear community
I am looking to implement multi-lingual support for my Revit apps (written in C# and implemented into Dynamo Custom nodes) and I would like to know if using built-in parameters in my English version of Revit API would be automatically translated in other languages if say, a user in China or Germany were to use my nodes in their native language version of Revit? Is it this simple?
Solved! Go to Solution.
Solved by jeremytammik. Go to Solution.
Dear Thomas,
Thank you for your query.
If you intend to provide multi-lingual support at all, I would strongly recommend avoiding all language dependent code wherever possible.
That will significantly simplify your job and provide greater robustness and ease of maintenance.
Especially for built-in parameters, it is extremely simple to avoid all language dependencies by using the built-in enumeration value instead of the language dependent display string.
You should always avoid using the language dependent method of looking up parameters by name when possible.
You can use the corresponding built-in parameter enumeration value instead, for built-in parameters, or the GUID, for shared parameters.
Looking up a parameter by display name is only necessary for custom family parameters.
Here are two of many related discussions by The Building Coder:
I hope this helps.
Best regards,
Jeremy
Hi Jeremy
Perfect, thanks for the answer. Enums were another query I had which you've answered.
The final issue I have is the default line style in a Revit Project. I look this up by name and therein lies one of the problems I've got. Fortunately its the default 'Line' style so I'm sure I can query this without using text. The problem I have with this strategy is when my program is executed in a Family document; it looks up the family document type, then concatenates the name to create the default line style in the family document (for example, the 'default' line style in a Door family is "Doors".)
Is there any way to obtain these line styles without relying on strings?
Regards
Thank you for your appreciation.
Nope, sorry, I do not know off-hand.
Maybe the default line style is the one with the lowest element id?
Cheers,
Jeremy
Hi Jeremy
Not a problem, seems like that may well be a sound solution.
Thanks once again for your answers
Regards
Tom