UI language != input language (at least not always!)

by Michael S. Kaplan, published on 2006/05/22 23:50 -07:00, original URI: http://blogs.msdn.com/michkap/archive/2006/05/22/604509.aspx


Rune asked (in this post):

Michael, on a related note, could you shed some light on language vs input locale?

I typically use a Norwegian keyboard layout, but many applications seem to think this means I also want Norwegian language in the UI. The most frustrating example is installing Intel's NIC drivers on a server. Half of the UI is in English and the rest in Norwegian. Confusing to say the least and certainly annoying.

I've been looking for a separate value that indicates the preferred language of the user, but all I can find is the input locale.

Rather silly if this is the case, but I do see many apps that makes this assumption, so...

There's nothing wrong with Norwegian, but the community is too small to warrant translation of computer terms. Someone have of course tried, but we all ignore their efforts.

Reading this was a horrifying experience for me, Rune....

It is one thing for people to misuse or misunderstand the differences between user locale, system locale, and UI language. And I have seen applications where one or both of the first two are mistaken for the third.

After all, the functions (GetUserDefaultLCID, GetSystemDefaultLCID, and GetUserDefaultUILanguage) are so easy to confuse, especially with confusing text like what is in GetUserDefaultLCID:

Remarks

On single-user systems, the return value is the same as that returned by GetSystemDefaultLCID.

But any application or driver that mixes up the input locale up with any of these is one that I would probably be pretty quick to uninstall. For me that just crosses a line....

Say it ain't so, Rune! Please! :-)

 

This post brought to you by "" (U+a039, a.k.a. YI SYLLABLE PIX)


# dono on Tuesday, May 23, 2006 3:30 AM:

I can relate.
My English-language XP system has the non-Unicode program setting set to Japanese. The Dell-installed system help files are in Japanese. The laptop pointer startup insists on a Japanese UI. The Java compiler insists on spitting out error messages in Japanese. Switching the non-Unicode support to English (US) fixes all of this. However, then I can not run the majority of my Japanese-lanaguage software (which unfortuately is mostly not Unicode-enabled). A little annoying, but I have learned to live with it.

# Malcolm on Tuesday, May 23, 2006 4:33 AM:

@dono

Have you tried the AppLocale tool.  It can set the non-unicode locale on a per-application basis. Not guaranteed to work, but might be worth a try:

http://www.microsoft.com/globaldev/tools/apploc.mspx

# dono on Tuesday, May 23, 2006 5:47 AM:

Malcolm,

Thanks. Yes, I am familiar with and have have tried the AppLocale tool, however with limited success. I experimented with various options a few years ago, but none were very satisfactory. I do not mind putting up with it anymore; it's just a pet-peeve.

# The SZ on Tuesday, May 23, 2006 6:03 AM:

Nice to read all your blames to the developer, but what should we do?

Give me an example which functions I should use! Starting from 95 to Vista!

I'm using GetUserDefaultLangID to decided which language I will display in my apps. The GetUserDefaultUILanguage function sucks because it always returns the system language if no mui is installed!

Steffen

# Christian on Tuesday, May 23, 2006 6:07 AM:

> Give me an example which functions I should use! Starting from 95 to Vista!

I second that.

Ch.

# Rune on Tuesday, May 23, 2006 8:10 AM:

Wow, that was a very fast follow-up Michael, thanks!

I was about to ask where I can set the UI Language, but Steffen's comment above seem to cover it.

I.e., since I haven't installed a MUI, the UI Language is English, right?

(Come to think of it, we're probably using the wrong method ourselves in our own application ;) )

# Michael S. Kaplan on Tuesday, May 23, 2006 10:35 AM:

Sorry Steffen and Christian and Rune, but GetUserDefaultUILanguage is the right function to call when it is available -- because *that* is the UI language of Windows itself. It is therefore of the language of everything that appears for the user before they launch your application, and a reasonable first guess for a language they will know?

You can certainly provide your own UI to let them make another choice beyond that, but it is the first, best guess.

Also -- note that the UI language will not be English, it will be the UI lang of Windows, which itself ships in many different languages....

# Jonas on Tuesday, May 23, 2006 6:25 PM:

One of the most prominent offenders is Sun with Java. I filed Bug 6380839 for that and it was marked as a duplicate of a 4-year-old RFE.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6380839

It's so bad that for some Java applications I need to break their EULAs and go through their .jar-archives and delete all foreign-language ResourceBundles, just to let our developers use english-language UIs with their German keyboards.

# pelleplutt on Wednesday, May 24, 2006 3:23 AM:

*rant*

I'm sorry but I have to say this is Microsoft's fault by removing the UI Language choice from single-language OS versions.

What I mean is that many users in countries such as Sweden use an English Windows installation but given a choice they would prefer a 100% Swedish UI in their applications.
The UI choice in Regional Settings, however, is only available in the special multi-language Windows version that I've yet to encounter anywhere (every version of Mac OS X on the other hand is multi-language from start). I think it even costs more and I don't think any PC vendor OEM's it. Actually I don't think many poeple know it exists. And isn't there a multi-language Office version as well?

So what are we application developers to do - well we have to resort to ugly hacks such as checking the other regional settings such as "Standards and Formats" to abide to our users wishes.
I.e. if the default UI language is English and the user has selected to use Swedish numbers, dates and times, we set the UILanguage of our apps to Swedish. Probably what Java does as well and I can understand them.

I wonder if the single-language Vista versions keep this annoying behavior of removing a user setting that many apps would like to be able to depend on but can't.

# dono on Wednesday, May 24, 2006 3:43 AM:

pelleplutt,

MUIs are unfortuately only available through volumn licensing programs:
http://www.microsoft.com/globaldev/DrIntl/faqs/MUIFaq.mspx#MUIques6

[Off topic]
Speaking of which, Michael, are you familiar with the reasons behind this decision? I have been puzzled about it for a while. I know that I would like to get a hold of a few MUIs. If available for resell, I would most likely buy a few. LIPs are available, but not in the languages that I want. Is there any hope for general availablility (download or purchase) of MUIs in the future?

# Rune on Wednesday, May 24, 2006 5:56 AM:

OK, I've been thinking about this some more. When you buy a computer from e.g. Dell Norway, you end up with Norwegian Windows. There's little choice (or not an obvious choice) and the user is more or less stuck with it.

Now, we just migrated to Exchange server, and when these users imported their old personal folders, they end up with two inboxes. One called "Innboks" and the old one "Inbox". Why? Because Outlook now thinks it is important to translate these special folder names since the user is obviously using Norwegian Windows...

By hiding the language choice from the user, we developers are tricked into using "alternative" (i.e. wrong) methods to discover the user's preferred language. And even when using the right method, some users (me :) ) will still be offended.

I hope the Vista team can come up with a sleaker approach to this problem. ;)

--
Rune

# The SZ on Wednesday, May 24, 2006 6:06 AM:

I have installed english windows and set all regional settings to german.  So which language do I expect? There is a reason why I set it to german. Because I'm in germany and speak german.

Of course, you can argue that I have to install a german version. But some people outside have installed a non-mother-tongue windows version. And only about these people we are talking. So my decision for GetUserDefaultLangID seems correct, because this function is returning german on my system.

In case of mui, GetUserDefaultLangID will probably return the same as GetUserDefaultUILanguage. (No user will install a english windows, install mui, set mui to swedish and locals to tonga)

Steffen

# Mihai on Wednesday, May 24, 2006 12:32 PM:

"LIPs are available, but not in the languages that I want."

From what I can see, only Slovenian is MUI only, everything else is MUI+LIP or LIP only.

# Mihai on Wednesday, May 24, 2006 12:36 PM:

<<Give me an example which functions I should use!>>

<<I have installed X windows and set all regional settings to Y. So which language do I expect?>>

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_0ddl.asp
http://support.microsoft.com/default.aspx?scid=kb;en-us;258047

# KJK::Hyperion on Wednesday, May 24, 2006 4:11 PM:

Don't quote me on this, but... if you have a legit Windows license, just pirate an English-language Windows, and pirate the MUI package (you can find a - slightly outdated - huge ISO with all languages, supporting all the way from Windows 2000 to Windows Server 2003). Microsoft can hardly accuse you of anything for doing that - consider it as giving them a big middle finger of feedback

Windows Vista will remove the need to pirate the English-language version, and introduces a new MUI API that is incompatible with the old one (but documented and much better) and the old MUI packs will probably stop working. I really hope language packs will then be available as free downloads, because the whole situation sucks

# Michael S. Kaplan on Wednesday, May 24, 2006 4:55 PM:

Hi Steffen,

The mixed settings case is not as uncommon as you might think, whether it woul be something that you personally would want or not.

KJK::Hyperion -- no comment, other than to say that you are mostly incorrect, though no one from MS will have to hunt you down for piracy since the system will be unbootable.

# Rune on Friday, May 26, 2006 2:20 AM:

OK, final thought: The WHQL certification should make sure drivers use these APIs appropriately. If I download the full "international" version of nVidia's approved drivers, I get the Norwegian UI (with confusing translation). The WHQL guys don't even bother testing PAE support, so recent (8x.xx) nVidia drivers won't work with >4GB systems running 32-bit Win2003 either...

--
Rune

go to newer or older post, or back to index or month or day