Archive: Is there a possibility to determine the OS language on runtime?


Is there a possibility to determine the OS language on runtime?
Hi,
I would like to provide localized installers within one binary. Is it possible to determine the language of the OS automatically through the registry or similar? Alternatively, I'd have to present an InstallOption dialog in order to picka language, but this would suck.

TIA,
spaetz


if its in the reg, query it. search for a language entry in regedit.


Maybe this is a nice registry entry:
HKEY_CURRENT_USER\Control Panel\International
and try to send up some interpreter for "iCountry", "sCountry" or "sLanguage". For "Dutch" (Nederlands) these entries take the following values: "31", "Nederland" and "NLD" respectively. Search a Microsoft site to find more country codes and setup a script that compares the countrycode to languages (codes) available for your program and which selects English when a non-supported language has been found.

-Hendri.


Thanks that helped a lot. I found some country codes which I needed...

I just didn't know the location of the registry setting


Spaetz,

take a look here for all country codes:
http://msdn.microsoft.com/library/en...cfg_list_b.asp

Check the table for the ISO Long codes. These should be comparable to the sLanguage parameters in the registry (as I see it).

[edit]
My reply was just a second too late. I didn't see your reply yet Spaetz, sorry. Good luck with implementing it! -Hn3.
[/edit]

Good luck,
-Hendri.