Re: Default Input Language



Mukhalisi wrote:
> Im trying programmatically to obtain the "Default Input Languge"
> (found in Control panel -> Regional and Language Settings ->
> Languages -> Details -> Settings ) using VB6, Would appreciate any
> help

(Is this a multipost?)

' Win32 Locale functions
Private Declare Function GetSystemDefaultLangID Lib "kernel32" () As Integer
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

' Localized name of language
Private Const SORT_DEFAULT As Long = &H0 ' sorting default

Public Function LocaleLangauge(Optional LCID As Long) As String
Dim nRet As Long
Dim buf As String

' If user didn't provide an LCID, use
' current system default value.
If LCID = 0 Then
LCID = GetSystemDefaultLangID
End If

' Determine buffer requirement for language.
nRet = GetLocaleInfo(LCID, LOCALE_SLANGUAGE, buf, 0)
buf = Space$(nRet)

' Obtain language description.
Call GetLocaleInfo(LCID, LOCALE_SLANGUAGE, buf, Len(buf))
LocaleLangauge = TrimNull(buf)
End Function

--
Working Without a .NET?
http://classicvb.org/petition


.



Relevant Pages

  • Re: Word/Windows Language
    ... (not the Dictionary language): English or French. ... ' Win32 Locale functions ... Public Function LocaleLangauge(Optional LCID As Long) As String ... Dim buf As String ...
    (microsoft.public.office.developer.vba)
  • Re: Internationalizing an app
    ... English although you'd never know it from my posts at times). ... based on the locale where the user is running the software. ... not an LCID and an LPCTSTR. ... Bits 9..0 are the language ID, and bits 15..10 are the sublanguage. ...
    (microsoft.public.vc.mfc)
  • RfD: Internationalisation
    ... 2007-06-26 Updated rationale section, LOCALE@, and minor wordsmithing ... text files that can be edited and converted to another language ... in a similar way to the ANS word C", but returns a string identifier ... We use the word locale to mean the mixture of country, language, ...
    (comp.lang.forth)
  • Re: Unable to display korean fonts
    ... In my Japanese build when i set the default language as "Japanese" ... the language of the entire OS was changed to Japan.But we want the Japanese ... Locale only for our appln.Similarly here we want the korean locale for our ... "Henrik Viklund" wrote: ...
    (microsoft.public.windowsce.platbuilder)
  • Re: loadstring fails in MBCS encoding
    ... Did you try to force the locale (language) with setlocale? ... > can't load MBCS resources correctly any more. ...
    (microsoft.public.vc.mfc)