Windows 7 Simplified Chinese
Posted: Tue Sep 07, 2010 1:42 pm
Hi
I have an issue with the installer when it runs on a Windows 7 simplified Chinese that it fails to detect the right language. What is weird is that on an XP that is in simplified Chinese things work fine. If I insert a message box to show the value of variable $LANGUAGE$ it shows English. However if in the installer I force variable LANGUAGE to Simplified Chinese (Chinese (Taiwan)) all text is garbage.
In order to test for this I created a very simple C++ application containing the following code and run it on the machine that InstallAware failed to detect the language:
TCHAR lang[MAX_PATH*2];
GetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_SENGLANGUAGE,lang,MAX_PATH);
wprintf(lang);
Surprisingly even the above C++ code on Simplified Chinese Windows 7 returned English. So probably InstallAware is doing this behind the scenes to detect the language. If it is I believe this is wrong and it should detect the OS language. The following code always detect the right system language settings:
TCHAR lang[MAX_PATH*2];
LANGID id = GetSystemDefaultUILanguage();
GetLocaleInfo(id,LOCALE_SENGLANGUAGE,lang,MAX_PATH);
wprintf(_T("%d %s"),id,lang);
Further investigation showed that in Windows 7 users can choose the locale for non Unicode programs in the regional settings that cause the GetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_SENGLANGUAGE,lang,MAX_PATH) call to return not the right information. Hence you need to enforce it with GetSystemDefaultUILanguage().
Can someone from InstallAware take care of this issue and launch a patch cause I am having major issues creating a multi lingual installer with InstallAware?
Regards
Aaron
I have an issue with the installer when it runs on a Windows 7 simplified Chinese that it fails to detect the right language. What is weird is that on an XP that is in simplified Chinese things work fine. If I insert a message box to show the value of variable $LANGUAGE$ it shows English. However if in the installer I force variable LANGUAGE to Simplified Chinese (Chinese (Taiwan)) all text is garbage.
In order to test for this I created a very simple C++ application containing the following code and run it on the machine that InstallAware failed to detect the language:
TCHAR lang[MAX_PATH*2];
GetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_SENGLANGUAGE,lang,MAX_PATH);
wprintf(lang);
Surprisingly even the above C++ code on Simplified Chinese Windows 7 returned English. So probably InstallAware is doing this behind the scenes to detect the language. If it is I believe this is wrong and it should detect the OS language. The following code always detect the right system language settings:
TCHAR lang[MAX_PATH*2];
LANGID id = GetSystemDefaultUILanguage();
GetLocaleInfo(id,LOCALE_SENGLANGUAGE,lang,MAX_PATH);
wprintf(_T("%d %s"),id,lang);
Further investigation showed that in Windows 7 users can choose the locale for non Unicode programs in the regional settings that cause the GetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_SENGLANGUAGE,lang,MAX_PATH) call to return not the right information. Hence you need to enforce it with GetSystemDefaultUILanguage().
Can someone from InstallAware take care of this issue and launch a patch cause I am having major issues creating a multi lingual installer with InstallAware?
Regards
Aaron