Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Inventor and CurrentUICulture

3 REPLIES 3
Reply
Message 1 of 4
nmunro
263 Views, 3 Replies

Inventor and CurrentUICulture

I'm looking at changing how we add language versions to our add-ins. Initial tests seem a bit flakey in that a foreign tester is seeing different result on two different machines. One machine shows the UI in the local language, whereas another machine shows almost everything in English, with an odd flash of the local language in one or two dialogs. In testing on this second machine everything in Inventor appears in the local language, but when callled from my add-in, System.Threading.Thread.CurrentThread.CurrentUICulture.Name returns "en-US".

 

In this post - http://forums.autodesk.com/t5/Inventor-Customization/Inventor-API-BUG-in-Double-parse-for-Microsoft-... I found the following:

 

"Many applications like Inventor override the CultureUICulture info in order to make sure that automatically the correct resources are loaded: in case of the English version of Inventor English resources are loaded, in case of Italian, Italian resources are loaded, etc., no matter what the Locale setting is on the system"

 

How could this be if Inventor's UI is displaying everything in the local language? I don't want to have to force the current UI culture for every dialog if there is a way around it. Or, is there something the user might have done on this one machine to cause the issue.

 

Neil

 

        


https://c3mcad.com

3 REPLIES 3
Message 2 of 4
adam.nagy
in reply to: nmunro

Hi Neil,

 

Have you seen this post?

http://adndevblog.typepad.com/manufacturing/2013/05/localize-inventor-net-addin.html

 

Which Inventor version are you testing with? - in case something changed.

 

I assume the user installed a language pack and Inventor starts up with that.

 

Cheers,



Adam Nagy
Autodesk Platform Services
Message 3 of 4
nmunro
in reply to: adam.nagy

Hi Adam,

 

Yes, I've read lots of posts. We have done localization for a few years now (with great success) but have changed to a new translation tool that helps a great deal. We used to have strictly embedded resx files but we now generate satellite dll's per language. It is more a question of what is Inventor doing that the CurrentUICulture for Inventor's thread would be set to "en-US" on a computer running in Germany. How does Inventor determine what this is set to? Are all Inventor installations 'en-US' culture on the initial install, and it is changed if a language pack other than English is installed? I'm just trying to answer why he is seeing a complete German UI on one computer while another has Inventor showing a German UI but the add-in is almost all in the invariant culture (en). The second one is the one that reports the CurrentUiCulture as en-US.

 

This is on 2015 although the add-in is supported on 2013-2015.

 

Neil

        


https://c3mcad.com

Message 4 of 4
adam.nagy
in reply to: nmunro

Hi Neil,

 

What language resources are used is set by the command line option "language", e.g. to start the Italian version:

"C:\Program Files\Autodesk\Inventor 2014\Bin\Inventor.exe" /language=ITA

If that command line option is not set, then Inventor reads the registry setting:

HKEY_CURRENT_USER\Software\Autodesk\Inventor\RegistryVersion18.0\CurrentLanguage

I'm not sure why the CurrentUICulture would be set to en-US when German UI is shown. Maybe some other AddIn keeps overriding CurrentUICulture

 

Cheers,



Adam Nagy
Autodesk Platform Services

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report