jeroenlemaire
asked on
howto get Windows system language from registry
Hi all,
I'm doing some development on office automatisation, and i ran into a little problem i can easily avoid, if only I can get the language of the Windows OS installed... The windows OS's i use are Windows 2003 and Windows XP. Now i'm running them in Dutch, French and English.
I guess there must be a registry-key somewhere indicating the installed Windows language...
Can anyone help me on that?
Thanx in advance!
I'm doing some development on office automatisation, and i ran into a little problem i can easily avoid, if only I can get the language of the Windows OS installed... The windows OS's i use are Windows 2003 and Windows XP. Now i'm running them in Dutch, French and English.
I guess there must be a registry-key somewhere indicating the installed Windows language...
Can anyone help me on that?
Thanx in advance!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you can call this function using VBA. take a look at http://vb.mvps.org/articles/ap199808.pdf
there is an article showing how to call this functon using vb
there is an article showing how to call this functon using vb
ASKER
For those who might be interested in how to use this in VBA:
'declare the function to call from the kernel32
Private Declare Function GetSystemDefaultLangID Lib "kernel32" () As Long
Once you've done that, you can get the languageID in a string like this:
Dim LanguageID as Integer
LanguageID = CInt(CStr(Val("&H" & Right(Hex(GetSystemDefault LangID()), 3))))
Thanks for getting me started Jase-coder!
The 250pts are for you!
'declare the function to call from the kernel32
Private Declare Function GetSystemDefaultLangID Lib "kernel32" () As Long
Once you've done that, you can get the languageID in a string like this:
Dim LanguageID as Integer
LanguageID = CInt(CStr(Val("&H" & Right(Hex(GetSystemDefault
Thanks for getting me started Jase-coder!
The 250pts are for you!
This key here
HKEY_USERS\.DEFAULT\Keyboa rd Layout\Preload
sets the default language for the login screen, which may answer your query
This link here shows the different country codes in use.
http://www.windowsitpro.com/Article/ArticleID/14867/14867.html
hth, Danny
HKEY_USERS\.DEFAULT\Keyboa
sets the default language for the login screen, which may answer your query
This link here shows the different country codes in use.
http://www.windowsitpro.com/Article/ArticleID/14867/14867.html
hth, Danny
ASKER
this is not the system language, but the keyboard lay-out...
i guess your kinda off-topic here...
i guess your kinda off-topic here...
ASKER