Sorting it all Out Michael Kaplan's random stuff of dubious value Be sure to read the disclaimer here first!
It was late last year that I got the following through the contact link:
Michael, I have a question that might be of particular interest to you. You might be able to answer it in one of your 30 to 40 blog entries you'll post today or tomorrow.I'm taking Microsoft curriculum classes for various MCTS tests that we're taking and we're doing the training for the 70-526 tests. We were discussing CurrentUICulture and CurrentCulture.Will you explain the difference between the two in .Net and also will you explain the differences between localization, globalization, and internationalization. If you would, I'd appreciate it, and I'll share your response with my class.Thanks,Chris
I probably missed the deadline of the class, but a I have mentioned previously this is probably not the place for time-critical responses. Sorry about that, Chris.
The question about globalization vs. localization vs. internationalization is one I have covered before, both jokingly and more seriously in posts like this one and this one that points at Larry's post. The "official definitions" according to the team behind Dr. International have been substantively changed at least once (and I don't exactly go along with the current "blessed" definitions for what it is worth), and not everyone agrees with the definitions I use (which pretty much match the ones Larry gave).
Given all of this, as a question it is meaningless if it is just going to be a bunch of people arguing about terminology definitions; conversations about the concepts have a chance of being more interesting.
So I am just going to focus on the other question of CurrentCulture vs. CurrentUICulture that came up again yesterday in this post and this one.
Now I have already pointed out that the actual names are probably not the greatest so if you want to talk about that you should probably comment in one of those posts. This post is gonna focus on the concepts.
The question that people asked yesterday is about wanting to know why these have to be two different properties-- why there is not just one.
Interestingly, it gets back to the fact that the concepts of internationalization and localization are two different things.
CurrentCulture, the managed analogue of the default user locale on Windows, comes from a list of many different choices (~208 of them on Vista) that allow a user to take any language version of Windows (even if it is not their native language) and see defaults for date formats and number formats and order of text in sorted lists that make sense to them. Now all you have to do is wait until December 5th for a tax refund check that you were supposed to receive on May 12th due to an ambiguous date like 5/12/2006 to realize that no matter what language one speaks one will have certain fixed opinions on these items. This list has existed in Windows for the entire life of Win32, and serves well the people who learned one of those few lucky languages to have Windows translated into it and who nevertheless had a preference for their formats and such that does not match that language.
In other words, the concept behind CurrentCulture has been in Windows all along, and the .NET Framework is merely trying to make use of this longstanding concept. Of course the name is not so great, as I pointed out yesterday, and it does not really describe to people what it is so that the name alone suggests appropriate use, but that is a reasonable excuse for when somebody makes a mistake, not an excuse to keep making the mistake once the meaning has been explained to you.
This setting does not, should not, and will not require one to run a localized version, because these preferences that one grows up with treating as "the way things are" cannot be changed without being a really awful user experience.
Now let's move over to CurrentUICulture, the managed analogue of the user default UI language in Windows that was introduced in Windows 2000 and is meant to cover the localization (a.k.a. localisation, a.k.a. translation) of Windows into other languages. It is about the resources that are loaded up so that the dialogs and alerts and menus and help screens and tooltips and so forth can be in a specific language. The managed version of this obviously needs to be scaled down to the application level rather than all of Windows. But the intended use is obvious no matter how much the name might suck.
The connection between the managed and unmanaged versions of these functionalities is not just one of heritage, by the way. The unmanaged Windows settings are the defaults used for the managed .NET ones. Just in case people did not want to rely on documentation or subtle hints, they could fall back to paying attention to this default behavioral imperative....
Now sometimes these two settings will obviously be expected to be the same. But there are several obvious scenarios where they wouldn't:
And there are other scenarios as well, and they are also valid.
So in the end there are two different concepts that for perfectly valid reasons a user might want as two different defaults.
Which means they get two different properties. For all the times that they are not the same....
Which is not to say that everyone has the right view on this; SQL Server, for example, has been doing it wrong at least since it was a Microsoft/Sybase joint project (discussed further here).
And if the names weren't so non-intuitive, this whole post might not have been so requested! :-)
This post brought to you by ඛ (U+0d9b, a.k.a. SINHALA LETTER MAHAAPRAANA KAYANNA)
Michael,
That 70-526 class is over, and I passed the test. Right now, we're training for the 70-536 and the Web Dev one. Our class will continue until May.
I appreciate the in-depth answer, and I'll stick a link to it on our class intranet.
Thanks a ton!
Chris Benard
I am really confused by:
"...even if they still want that default user locale setting that affects behavior they really have been accustomed to since for all intensive purposes their zygote phase."
Firstly, whenever someone says "for all intensive purposes" they usually mean "for all intents and purposes". (Like a "Safety Posit Box" or "Safety Deposit Box", when they mean "Safe Deposit Box"). (Come on, you're a language guy, you should know this)
Do you mean something like: "...even if they still want their default user locale setting for behavior set to what they have been accustomed to since--for all intents and purposes--their zygote phase."?
I usually don't pick appart grammar and such, but I couldn't figure out what you meant at all for a good while.
Hmmm.... given the googlefight results, I think prescriptive grammarians have lost on this one. :-)
Define "for all intensive purposes" for me.
Just because everyone says it doesn't mean it's right. How many people say "loose" when they mean "lose"? How many people say "it's" when they mean "its"? How many "people" (as defined by the law) said slavery was OK in the early 1800s? How many "people" (as defined by the law) said that women were second class citizens in the early 1800s? Just because "everyone" says it, doesn't make it right.
"For all intensive purposes" means "For purposes which are intensive only. All other purposes are discluded." Therefore, "since their zygote phase" would only apply to "intense" purposes, exceptional cases, rather than general ones. Is this truly what you meant? Or did you in fact mean, "all intents and purposes", which means "all purposes, and all intents".
As a language and internationalization person, you should prefer the CLEARER, rather than the more used, method. The more often used phrase does not make sense to non-native English speakers or persons who have not encountered the phrase. By using an incorrect phrase, you remove any and all clues to your meaning. Is that what you want?
I never said it was right... I was being skeptical about the "confusion" given how widespread and common the mistake is in other places.
My interesting linguistics and internationalization and language do not make me a prescriptive grammarian, so I am not obsessive about such things. So will I make the mistake again? Maybe not. But I don't fix every typo, either.
And I don't think I have removed "any and all clues" to anything, really. HYPERBOLE is a very confusing facet of comments, and often makes me suspect that the commenter either didn't get the point of the article or decided not to read it. But that's not really related...
That phrase is a small piece of a larger article that has nothing to do with the point being made, and there is no way that the importance of that small piece would be misunderstood to be more important no matter what the confusion might be? :-)
The confusion wasn't about the phrase "for all intensive purposes". I understood what was meant there, that cmment was a throw away correction. Using "intensive" instead of "intents and" only throws away ("any and all") clues to the extent of that single phrase.
I couldn't understand that which was around the phrase. Possibly because I did not understand what a "zygote phase" was. After looking it up, and looking over the sentance several more times, I can somewhat peice together the meaning of the sentance. But the sentance itself (from "even" beyond) comes across as a bit clunky and was hard for me to understand.
To check my understanding, I've rewritten the sentance, and ask if it's correct:
"There are a lot of times when a person is multilingual; they may want to use a different localized version or switch to a different MUI version, if they have it. Even if they do they may want to keep the same behavior of the locale setting they’ve been accustomed to since—for all intentsive purposes[sic]—the zygote phase."
Is that basically what you meant?
I don't know why it's hard for me to understand the sentance, it just was.
Delete the sentence in your mind as you read. You'll enjoy the experience much more (if not then are probably other blogs you can follow!).
It's time to move back on topic, I think....
Actually, the correct google fight URL would be: http://www.googlefight.com/index.php?lang=en_GB&word1=%22intensive+purposes%22&word2=%22intents+and+purposes%22 since you're looking for the whole phrase, not just individual words in the phrase...
Which puts "intents and purposes" as 10 times more common than "intensive purposes" :)
Anyway, I'm sure most of us were able to figure out what you mean ;)
It's amazing how the process of making an application localizable can be both simple and confusing at
Harking back to an earlier post by Erzengel I agree that the literal translation of "for all intents and purposes" is "for all intents and all purposes" however the phrase is generally accepted to mean "for all practical purposes".
In the meantime, given the intensity with which some people are arguing this minute point that has nothing to do with the original topic, I would argue that FOR ALL INTENSIVE PURPOSES is actually valid given how intense everyone is! :-)
Hi,
I need to fetch the current time zone info on windows 2003 server .. specifically the day and month in french
I know it can be done using
private static extern int GetTimeZoneInformation(out TimeZoneInformation lpTimeZoneInformation);
but my problem is that it returns the time zone standard name in the language which is currently used on the device(like German).
I want it to be in french
Is it possible?
This really belongs in the Suggestion Box (see the link on the right for it). It really has nothing to do with this post and is a request for a new one....
thanks for this very good article. I'm currently estimating the effort needed to make our software localizable and you helped me a lot with understanding the difference between those two properties.
But I encourtered another problem. I tried everything (i think) to get Windows XP to give me another CurrentUILanguage than my non-MUI Windows language (German). Is it possible, that only the MUI-Version supports changing the default user interface language?
Thanks a lot.
I have a CurrentCulture vs. CurrentUICulture issue and I don't understand how to resolve it. If you could help, I would greatly appreciate it.
I have a Windows XP computer with English installed for the OS and French set in Control Panel/Regional Settings. The CurrentCulture returns English and the CurrentUICulture returns French.
I have a Windows Server 2003 computer with French installed for the OS and French set in Control Panel/Regional Settings. The CurrentCulture returns French and the CurrentUICulture returns English.
As it stands right now, I can't always use either CurrentCulture or CurrentUICulture. How can I make this work?