.NET Forum / .NET Framework / Internationalization / February 2005
Culture vs UICulture
|
|
Thread rating:  |
John Bowman - 13 Jan 2005 17:28 GMT Hi,
I'm fairly new to the .NET internationalization mechanism. I'm trying to understand what's different about the following and when I need to use 1 vs the other. If I retrieve:
Thread.CurrentThread.CurrentCulture as opposed to Thread.CurrentThread.CurrentUICulture
I wrote a simple test app that retrieves their respective values into a MessageBox: ThreeLetterISOLanguageName ThreeLetterWindowsLanguageName NativeName Name LCID DisplayName EnglishName
When I run it on English US Windows XP with English US Regional settings, all the values indicate English US as expected. However, when I switch my regional settings (sinceI don't yet have access to a true French Windows w/ French .NET) to something else such as French France, then only the CurrentCulture settings are changed to indicate this. The UICulture settings remain indicating English US.
4 Q's:
1) What's the difference between CurrentCulture and CurrentUICulture and their repsective purposes?
2) What's really the difference between changing regional settings and fully installing genuine foreign language system from top to bottom?
3) Since I currently don't yet have access to a true French Windows w/ French .NET, to test it, what should I expect on true French Windows XP?
4) When do you use the 1 vs the other to determine the 3 letter language and why?
TIA,
 Signature John C. Bowman Software Engineer Thermo Electron Scientific Instruments Div. <Remove this before reply> john.bowman@thermo.com
|||Cypher||| - 13 Jan 2005 18:50 GMT Hello John;
May I suggest reading this 3-part article http://www.devx.com/dotnet/Article/6997 ? Then it will become clear as crystal to you.
I implemented and derived from it to build up my own I8n Framework. see it in action at http://www.123roommate.com/ (still beta).
-- Olivier aka Cypher.
> Hi, > [quoted text clipped - 38 lines] > > TIA, John Bowman - 13 Jan 2005 20:54 GMT Cypher,
Thanks for the link. Hopefully it'll clear up the mud <g>
John
> Hello John; > [quoted text clipped - 55 lines] >> >> TIA, Steven Cheng - 17 Feb 2005 04:31 GMT Hi John,
Culture is the object that used to specify localize info for non-UI things such as Date, Currency, Sorting, .....
While the UICulture is for specifying the locallized UI info( which UI resource set to use).
The Region setting in the system's control panel is mapping to the Culture rather than the UICulture.
The UICulture corresponding to the system's Input UI Language setting( unchangable if your OS havn't MUI PACK installed).
For detailed reference, you can have a look at the microsoft's globaldev portal, i'm sure you can find many useful info there:
http://www.microsoft.com/globaldev/default.mspx
Thanks,
Steven
> Cypher, > [quoted text clipped - 63 lines] >>> >>> TIA, Michael (michka) Kaplan [MS] - 17 Feb 2005 06:16 GMT "Steven Cheng" <v-schang@microsoft.com> wrote...
> The Region setting in the system's control panel is mapping to the Culture > rather than the UICulture. Actually, it is the GEO setting, it is not a mapping from any type of culture or locale. :-)
 Signature MichKa [MS] NLS Collation/Locale/Keyboard Technical Lead Globalization Infrastructure, Fonts, and Tools Microsoft Windows International Division
This posting is provided "AS IS" with no warranties, and confers no rights.
Steven Cheng - 17 Feb 2005 09:55 GMT Thanks for your correction MichKa ,
Yes, I should say those region settings has the same functions in WIN32 app like the Culture in .NET app. Also, in WIN32 seems all these settings are called XXXLocale which are very confusing. :(
Steven
> "Steven Cheng" <v-schang@microsoft.com> wrote... > [quoted text clipped - 4 lines] > Actually, it is the GEO setting, it is not a mapping from any type of > culture or locale. :-) Michael (michka) Kaplan [MS] - 17 Feb 2005 13:12 GMT I agree with you on the confusion. I think the logic was that there were enough subtle differences between the .NET framework analogue to the Win32 locale that a new name seemed like the easiest way to capture the fact that they are indeed two different (if analogous) beasts....
So, it is like this:
default user locale (standards and formats) becomes CurrentCulture
default user UI language becomes CurrentUICulture
User GEOID (location) becomes CurrentRegion
I should blog about thus someday (http://blogs.msdn.com/michkap).
:-)
 Signature MichKa [MS] NLS Collation/Locale/Keyboard Technical Lead Globalization Infrastructure, Fonts, and Tools Microsoft Windows International Division
This posting is provided "AS IS" with no warranties, and confers no rights.
> Thanks for your correction MichKa , > [quoted text clipped - 13 lines] > > Actually, it is the GEO setting, it is not a mapping from any type of > > culture or locale. :-) Steven Cheng - 21 Feb 2005 10:28 GMT En, yes.
Or can I say that the rules(MS suggest us to follow ) for using OS locale setting in win32 now become the buildin classes and interfaces in .NET(with much clearer names)?
:-) Thanks & Regards,
Steven
>I agree with you on the confusion. I think the logic was that there were > enough subtle differences between the .NET framework analogue to the Win32 [quoted text clipped - 38 lines] >> > Actually, it is the GEO setting, it is not a mapping from any type of >> > culture or locale. :-) Michael (michka) Kaplan [MS] - 22 Feb 2005 18:11 GMT Yes, the goal was indeed more intuitive names.... of course people who were used to the old ones see it as shuffling without cause, so I guess in the end it all evens out....
 Signature MichKa [MS] NLS Collation/Locale/Keyboard Technical Lead Globalization Infrastructure, Fonts, and Tools Microsoft Windows International Division
This posting is provided "AS IS" with no warranties, and confers no rights.
> En, yes. > [quoted text clipped - 49 lines] > >> > Actually, it is the GEO setting, it is not a mapping from any type of > >> > culture or locale. :-)
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|