Newsgroup: it.comp.lang.visual-basic
Titolo: Reperimento impostazioni della lingua

Un saluto a tutti voi.
Due richieste :
1 - Se si può, come si può reperire la lingua utilizata sul Pc ??? Esistono
delle "Api" che svolgono questo lavoro ??? Quali sono ???
2 - C'è una tabella, un file o un qualsiasi altro marchingegno dove sono
memorizzate tutte le ID delle lingue ???
Grazie a chi mi vuole aiutare.

memorizzate tutte le ID delle lingue ???
Preso da qui:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_11750158.html
<codice>
Option Explicit
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
Declare Function GetUserDefaultLangID Lib "kernel32" () As Integer
Declare Function GetUserDefaultLCID Lib "kernel32" () As Long
Declare Function GetSystemDefaultLangID Lib "kernel32" () As Integer
Declare Function GetSystemDefaultLCID Lib "kernel32" () As Long
Const LANG_AFRIKAANS = &H36
Const LANG_ALBANIAN = &H1C
Const LANG_ARABIC = &H1
Const LANG_BASQUE = &H2D
Const LANG_BELARUSIAN = &H23
Const LANG_BULGARIAN = &H2
Const LANG_CATALAN = &H3
Const LANG_CHINESE = &H4
Const LANG_CROATIAN = &H1A
Const LANG_CZECH = &H5
Const LANG_DANISH = &H6
Const LANG_DUTCH = &H13
Const LANG_ENGLISH = &H9
Const LANG_ESTONIAN = &H25
Const LANG_FAEROESE = &H38
Const LANG_FARSI = &H29
Const LANG_FINNISH = &HB
Const LANG_FRENCH = &HC
Const LANG_GERMAN = &H7
Const LANG_GREEK = &H8
Const LANG_HEBREW = &HD
Const LANG_HUNGARIAN = &HE
Const LANG_ICELANDIC = &HF
Const LANG_INDONESIAN = &H21
Const LANG_ITALIAN = &H10
Const LANG_JAPANESE = &H11
Const LANG_KOREAN = &H12
Const LANG_LATVIAN = &H26
Const LANG_LITHUANIAN = &H27
Const LANG_NORWEGIAN = &H14
Const LANG_POLISH = &H15
Const LANG_PORTUGUESE = &H16
Const LANG_ROMANIAN = &H18
Const LANG_RUSSIAN = &H19
Const LANG_SERBIAN = &H1A
Const LANG_SLOVAK = &H1B
Const LANG_SLOVENIAN = &H24
Const LANG_SPANISH = &HA
Const LANG_SWEDISH = &H1D
Const LANG_THAI = &H1E
Const LANG_TURKISH = &H1F
Const LANG_UKRAINIAN = &H22
Const LANG_VIETNAMESE = &H2A
Public Function LangIDToString(ByVal lid As Long) As String
 Dim s$
 
 Select Case lid
   ' leave your supported languages in this list
   Case LANG_AFRIKAANS: s = "AFRIKAANS"
   Case LANG_ALBANIAN: s = "ALBANIAN"
   Case LANG_ARABIC: s = "ARABIC"
   Case LANG_BASQUE: s = "BASQUE"
   Case LANG_BELARUSIAN: s = "BELARUSIAN"
   Case LANG_BULGARIAN: s = "BULGARIAN"
   Case LANG_CATALAN: s = "CATALAN"
   Case LANG_CHINESE: s = "CHINESE"
   Case LANG_CROATIAN: s = "CROATIAN"
   Case LANG_CZECH: s = "CZECH"
   Case LANG_DANISH: s = "DANISH"
   Case LANG_DUTCH: s = "DUTCH"
   Case LANG_ENGLISH: s = "ENGLISH"
   Case LANG_ESTONIAN: s = "ESTONIAN"
   Case LANG_FAEROESE: s = "FAEROESE"
   Case LANG_FARSI: s = "FARSI"
   Case LANG_FINNISH: s = "FINNISH"
   Case LANG_FRENCH: s = "FRENCH"
   Case LANG_GERMAN: s = "GERMAN"
   Case LANG_GREEK: s = "GREEK"
   Case LANG_HEBREW: s = "HEBREW"
   Case LANG_HUNGARIAN: s = "HUNGARIAN"
   Case LANG_ICELANDIC: s = "ICELANDIC"
   Case LANG_INDONESIAN: s = "INDONESIAN"
   Case LANG_ITALIAN: s = "ITALIAN"
   Case LANG_JAPANESE: s = "JAPANESE"
   Case LANG_KOREAN: s = "KOREAN"
   Case LANG_LATVIAN: s = "LATVIAN"
   Case LANG_LITHUANIAN: s = "LITHUANIAN"
   Case LANG_NORWEGIAN: s = "NORWEGIAN"
   Case LANG_POLISH: s = "POLISH"
   Case LANG_PORTUGUESE: s = "PORTUGUESE"
   Case LANG_ROMANIAN: s = "ROMANIAN"
   Case LANG_RUSSIAN: s = "RUSSIAN"
   Case LANG_SERBIAN: s = "SERBIAN"
   Case LANG_SLOVAK: s = "SLOVAK"
   Case LANG_SLOVENIAN: s = "SLOVENIAN"
   Case LANG_SPANISH: s = "SPANISH"
   Case LANG_SWEDISH: s = "SWEDISH"
   Case LANG_THAI: s = "THAI"
   Case LANG_TURKISH: s = "TURKISH"
   Case LANG_UKRAINIAN: s = "UKRAINIAN"
   Case LANG_VIETNAMESE: s = "VIETNAMESE"
   Case Else: s = "ENGLISH"  ' if its not supported default to english
(or whatever you prefer)
 End Select
 LangIDToString = s
End Function
' uso:
dim lid as long, s as string
lid = GetUserDefaultLangID() And &HFF
s = LangIDToString(lid)
</codice>
-- 
hth, hal