How to convert a Revit plugin from english to other languages?

How to convert a Revit plugin from english to other languages?

Anonymous
984 Views
3 Replies
Message 1 of 4

How to convert a Revit plugin from english to other languages?

Anonymous
Not applicable

Hey everybody,

I have been developing revit plugins for past 1-2 years in English language. I intend to convert my plugin into other languages so that I can make it useful for people all around the world. I would appreciate if anybody could help me with the procedure for doing so.

Thank you

Regards,

Padmanabh 

Accepted solutions (1)
985 Views
3 Replies
Replies (3)
Message 2 of 4

lukaskohout
Advocate
Advocate
Accepted solution

You can use Resources with string table:

https://stackoverflow.com/questions/1142802/how-to-use-localization-in-c-sharp

 

Try Googel for more details.


Hitting Accepted Answer is a Community Contribution from me as well as from you.
======================================================================
Message 3 of 4

Anonymous
Not applicable

Thank you very much, it helped me. Sorry for the late reply.

 

Regards,

Padmanabh.

0 Likes
Message 4 of 4

Anonymous
Not applicable

How do you do it? @Anonymous 

 

Command code:

 

 

 

 

    [Transaction(TransactionMode.Manual)]
    [Regeneration(RegenerationOption.Manual)]
    public class Command : BaseCommand
    {
        private FamilyTreeForm form;

        protected override void Execute(ElementSet elements)
        {
            CultureInfo.DefaultThreadCurrentCulture = new CultureInfo(Resources.Language);
            CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo(Resources.Language);

            form = new FamilyTreeForm(doc, mainHandle);
            form.ShowDialogPlus();
        }
    }

 

 

 

 

Addin file:

 

 

 

 

   <AddIn Type="Command">
      <Assembly>FamilyTree\FamilyTree.dll</Assembly>
      <ClientId>86317968-1B3F-4E8F-942E-0F4510BB5BC4</ClientId>
      <FullClassName>Tom.FamilyTree.Command</FullClassName>
      <Text>FamilyTree</Text>
      <VisibilityMode>AlwaysVisible</VisibilityMode>
      <LanguageType>Unknown</LanguageType>
      <VendorId>TOM</VendorId>
      <VendorDescription></VendorDescription>
  </AddIn>

 

 

 

 

Reference: https://forums.autodesk.com/t5/revit-api-forum/language-resources-are-not-parsed-properly/td-p/11502581

 

All of the above seems to be useless.

 

Here are the latest discussions:

https://forums.autodesk.com/t5/revit-api-forum/issue-with-languagetype-in-addin-manifest-for-localization/m-p/11512935#M66903

 

I seem to have made a closer to the correct answer in this discussion thread. There is still a doubt in there, LanguageType seems to be just a text identifier and seems to have no real value in sight.