lafafmentvotre Posted November 30, 2009 Share Posted November 30, 2009 Hi everybody and sorry for my bad english I want to know how to detect OS language installed on computers. Not the default language used by user but the language installed I use this script to detect the default language used by user : $Lang_dll = DllOpen("kernel32.dll") $UserIntLang=DllCall ( $Lang_dll, "int", "GetUserDefaultUILanguage" ) If @error=0 Then $UserIntLang=Hex($UserIntLang[0],4);conversion en HEX Else $UserIntLang="UNKNOWN" EndIf DllClose($Lang_dll) Func _Language() Select ;Case StringInStr("0413,0813", $UserIntLang) ;Return "Dutch" Case StringInStr("0409,0809,0c09,1009,1409,1809,1c09,2009,2409,2809,2c09,3009,3409", $UserIntLang) Return "English" Case StringInStr("040c,080c,0c0c,100c,140c,180c", $UserIntLang) Return "French" EndSelect EndFunc but some computers are installed with XP EN and MUI FR and others with only XP FR. How to detect this ? Thanks Link to comment Share on other sites More sharing options...
99ojo Posted November 30, 2009 Share Posted November 30, 2009 Hi, because you use GetUserDefaultUILanguage to detect user language, have a look at GetSystemDefaultUILanguage http://msdn.microsoft.com/en-us/library/dd318123(VS.85).aspx to detect os language. ;-)) Stefan Link to comment Share on other sites More sharing options...
lafafmentvotre Posted November 30, 2009 Author Share Posted November 30, 2009 Thanks It's ok now Have a good day Link to comment Share on other sites More sharing options...
99ojo Posted November 30, 2009 Share Posted November 30, 2009 hi, more simple: Have a look at macro @OSLang. ;-)) Stefan Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now