WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Language Vers - Regional Settings

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

OS Language Detection


Question:

Is the OSLanguage property of the Win32_OperatingSystem class of WMI a reliable indicator of the installed language version? What affect does the Regional Options settings have on OSLanguage?

Answer:

No idea really. I suspect the information is good. Sounds more like a Microsoft question.

Look in the MSDN under National Language Subsystem (NLS) for more than you ever wanted to know about that subject. There are at least three possible "current" languages:

  1. The OS / Machine language.

  2. The User Language.

  3. The Thread Language.


; Get Language version ;
Language="0000"
If ((v=="1-4-10")||(v=="1-4-90")) Then
If RegExistValue(@REGMACHINE, "SYSTEM\CurrentControlSet\Control\Nls\Locale") then
Language=RegQueryValue(@REGMACHINE, "SYSTEM\CurrentControlSet\Control\Nls\Locale")
Language=StrFixCharsL(Language, "", 4)
EndIf
Else
If RegExistValue(@REGMACHINE, "SYSTEM\CurrentControlSet\Control\Nls\Language[InstallLanguage]") == @TRUE
Language=RegQueryValue(@REGMACHINE, "SYSTEM\CurrentControlSet\Control\Nls\Language[InstallLanguage]")
EndIf
EndIf
Where Language is LCID of istalled language version of Windows. If you need current regional settings use
; Get Regional settings ;
RegSet="0000"
If RegExistValue(@REGMACHINE, "SYSTEM\CurrentControlSet\Control\Nls\Language[Default]") == @TRUE
RegSet=RegQueryValue(@REGMACHINE, "SYSTEM\CurrentControlSet\Control\Nls\Language[Default]")
EndIf
Here http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vsmsclcid.asp you can find description for LCID number
Article ID:   W16499
File Created: 2005:02:18:12:21:00
Last Updated: 2005:02:18:12:21:00