We have just started exploring what required for internationalizing our applications. One thing I'm not clear on is how the .NET Framework decides what language/culture to use when displaying messag开发者_如何学JAVAes to users etc. Does it do this based on the version of Windows (French, German etc.) installed and/or the region/location selected in any version of Windows?
Thanks very much.
This article explains the influence of control panel settings and the installed Windows language on the CurrentCulture and CurrentUICulture properties:
http://en.csharp-online.net/Localization_Like_the_Pros%E2%80%94CurrentCulture_and_CurrentUICulture
It uses both pieces of information.
The 2 main properties here are Thread.CurrentCulture and Thread.CurrentUICulture
- The CurrentCulture is used to determine the (default) formatting, ie 31-12-2009 or 12/31/2009.
- The CurrentUICulture determines which resources to load.
You can change both properties but usually they are set correctly by the Framework on startup.
It uses culture and ui culture you set in the regional settings from control panel. If the application doesn't have internationalized resources for that culture, it uses default ones.
精彩评论