ramyaa
23rd July 2007 14:44 UTC
Cant modify $LANGUAGE
Where can i change the $LANGUAGE variable?? The Docs say that it can be changed in the .onInit function , but im unable to do it. Can sombody throw more light on its usage? I want the $LANGUAGE to be same as that of the Locale... (same as HKEY_CURRENT_USER\Control Panel\International\Locale)
Thanks,
Ramya
Joel
23rd July 2007 15:16 UTC
What is the code that you are using?
Red Wine
23rd July 2007 17:57 UTC
The taken value from that registry key isn't compatible with the value which should be stored in $LANGUAGE, so you'd need somehow to translate it e.g.
ReadRegStr $0 HKCU "Control Panel\International" "Locale"
StrCmp $0 "00000408" 0 next
StrCpy $LANGUAGE ${LANG_GREEK}
next:
Obviously this is too much, so it's better using the system plugin. Here is a snippet found in forum,
System::Call "kernel32::GetUserDefaultLangID()i .r0"
StrCpy $LANGUAGE $0
kichik
23rd July 2007 19:05 UTC
0408 is actually almost the same as ${LANG_GREEK}. 0x408 is 1032 and so is ${LANG_GREEK}. So instead of a huge switch, simply copy 0x$0 into $LANGUAGE.
The System can be simplified as well. Use `i .a` instead of `i .r0` and the result will go directly into $LANGUAGE.
ramyaa
25th July 2007 11:17 UTC
Thanks a lot buddies.... That helped me! :)