cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
oddys4
Level 3

Language ID is different

Hi,
This is a duplicate of a post in IS 2008 forum.. I couldn't get any help there.

--
I have a script that detects the language selected by the user then compare to the language of the OS:

if (SELECTED_LANGUAGE != SYSINFO.nSystemDefaultUILangID) then
NumToStr( szTemp2, SELECTED_LANGUAGE ); //9
MessageBox(szTemp2, WARNING);
NumToStr( szTemp1, SYSINFO.nSystemDefaultUILangID ); //1033
MessageBox(szTemp1, WARNING);
MessageBox(@NONDEFAULT_LANG_MSG, WARNING);
endif;


OK, so they are both really English. I selected English and my system is English. I don't understand why the selected language comes back as 9, and nSystemDefaultUILangID comes back as 1033. What's going on?
I checked topic "language identifier", and it looks like the 9 is a chopped version of 0x0409, and 1033 is for MSI; however, I'm developing in installscript!

Thanks! any help would be much appreciated.
Labels (1)
0 Kudos
(4) Replies
RobertDickau
Flexera Alumni

Right, I gather 0x09 is the generic English identifier, where 0x0409 (decimal 1033) is U.S. English, 0x1009 is Canadian English, 0x0809 is U.K. English, and so forth. So yes, matching that end of the field seems it should do it.
0 Kudos
oddys4
Level 3

Thanks Robert for the follow-up:
SYSINFO.nSystemDefaultUILangID however comes back 1033 on a Windows XP English system.
No matter how I chop it off to get that 9, I'm still stuck with trying to compare 9 with 1033, which should match if they are both English.
Thoughts?

Thanks.
Mike
0 Kudos
RobertDickau
Flexera Alumni

If you change the 1033 to hex, you'll see it's 0x0409, which should make the comparison clearer:

SprintfBox(INFORMATION, "Language ID", "dec %d, hex %0x",
SYSINFO.nSystemDefaultUILangID, SYSINFO.nSystemDefaultUILangID);
0 Kudos
oddys4
Level 3

Doh.

Thanks Robert.. didn't catch that!
0 Kudos