Localization, MUI and the CLR
-
05-07-2019 - |
Question
I am having some strange behavior when attempting to view my app in a different language. When using a box with a MUI installed (German in this case) and I switch the language to German (the setting is "Language used in menus and dialogs" in the regional and language options) all my forms and controls are translated into pseudo-German (as they should be). When I move to a box that does not have the MUI installed, I can't get it to display German. The strange part is when an exception message is generated by the CLR because the dialog is translated when I change the "Standards and formats" locale to German(Germany). Is there any way to incorporate this type of functionality into my app? Do I have to require a MUI be installed on a machine to be able to allow for my satellite assemblies to be loaded? (I am using ResourceManager and resx files. )
Solution 2
I had to install the MUI to get this to work properly.
OTHER TIPS
You need to set the current UI culture for your app's thread:
System.Globalization.CultureInfo.CurrentUICulture =
new System.Globalization.CultureInfo("de");