Language of the OS 
Author Message
 Language of the OS

How would I go about finding the language version of the os my app is
running on?

Thanks



Wed, 14 Jul 2004 00:36:53 GMT  
 Language of the OS
'Is this what you are looking for?

Private Const LOCALE_ILANGUAGE = &H1
Private Const LOCALE_SLANGUAGE = &H2

Private Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA"
(ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String, ByVal
cchData As Long) As Long
Private Declare Function GetSystemDefaultLCID Lib "kernel32" () As Long

Private Sub Form_Load()
    Dim Locale As Long
    Dim lpLCData As String
    Dim cchData As Long
    Dim lRet As Long
    Dim strLanguage As String

    Locale = GetSystemDefaultLCID()
    lpLCData = Space(260)
    cchData = Len(lpLCData)
    lRet = GetLocaleInfo(Locale, LOCALE_SLANGUAGE, lpLCData, cchData)

    If lRet > 0 Then
        strLanguage = Left$(lpLCData, lRet)
    End If
End Sub


Quote:
> How would I go about finding the language version of the os my app is
> running on?

> Thanks



Wed, 14 Jul 2004 02:58:06 GMT  
 Language of the OS
Yep, thanks Mike


Quote:
> 'Is this what you are looking for?

> Private Const LOCALE_ILANGUAGE = &H1
> Private Const LOCALE_SLANGUAGE = &H2

> Private Declare Function GetLocaleInfo Lib "kernel32" Alias
"GetLocaleInfoA"
> (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String,
ByVal
> cchData As Long) As Long
> Private Declare Function GetSystemDefaultLCID Lib "kernel32" () As Long

> Private Sub Form_Load()
>     Dim Locale As Long
>     Dim lpLCData As String
>     Dim cchData As Long
>     Dim lRet As Long
>     Dim strLanguage As String

>     Locale = GetSystemDefaultLCID()
>     lpLCData = Space(260)
>     cchData = Len(lpLCData)
>     lRet = GetLocaleInfo(Locale, LOCALE_SLANGUAGE, lpLCData, cchData)

>     If lRet > 0 Then
>         strLanguage = Left$(lpLCData, lRet)
>     End If
> End Sub



> > How would I go about finding the language version of the os my app is
> > running on?

> > Thanks



Fri, 16 Jul 2004 19:55:54 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. help:display european language on Chinese OS

2. How to check the language of the OS

3. How to determine the LANGUAGE of the OS

4. help:display European language on Chinese OS

5. help:display European language on Chinese OS

6. How to determine the LANGUAGE of the OS

7. Determine the language of the OS

8. Diff between Pocket PC OS / Handled PC OS/ Embedded NT OS

9. How do I: Determine Windows OS Language?

10. Building Applications for different OS Languages....

11. Determine installed language of OS (Win 9x - NT)

12. how to know the OS language

 

 
Powered by phpBB® Forum Software