The pen is located on the "Keyboard and Languages" tab of the "Region and Language" control panel. Click "Install / Uninstall Languages ββand hellip"; to get started. If you have only one user interface language installed, you will need to install one more. The master should guide you through this. You will also need to log out and log back in to see the effect.
In most cases, the CurrentUICulture property returns the first language in the list of preferred user interface languages, so setting this should be sufficient. Other languages ββare used as backup languages ββif the required resources are not available in your preferred language.
But the actual algorithm that CurrentUICulture uses to determine the culture of the user interface is a little more complicated:
- First, it checks the
DefaultThreadCurrentUICulture property. If it is not null , it returns any user interface culture that was set by default for all threads in the current application domain. - If
DefaultThreadCurrentUICulture is null , it calls the GetUserDefaultUILanguage function.- This function checks if the current user sets the preferred user interface language, as described at the beginning. If so, he returns that language.
- If the user has not set the user interface language, the function returns the language of the user interface that is set for the system. This is done by the administrator on the "Advanced" tab of the "Region and Language" control panel and requires a reboot in order to take effect.
- If there is no preferred language for the system, then the default user interface language is used. This is either the language of the localized version of Windows (XP and earlier), or the language that was selected during installation (Vista and later).
Of course, this testing method can be a bit overwhelming because it changes the global settings (at least for the entire user account). Since the current UI culture is supported for the thread , you can only change it for your application thread. To do this, set the Thread.CurrentUICulture property. If your application is multithreaded, you can set the DefaultThreadCurrentUICulture property to make sure that the additional threads are in the correct culture. This question says you already found this, but I donβt understand why you do not want to use it.
Also, be careful when confusing the user interface language in the locale; They are not the same. CurrentCulture is a locale that sets elements such as date / number / time formats and sort order. CurrentUICulture is a user interface language that is associated with loading properly localized resources. They can be the same, and I believe that they often happen, but they should not be. There are times when the user may want them to be different; for example, if they speak English and prefer a localized English version, but want to see things like dates and times formatted according to their custom.
source share