LowLevel
LowLevel

Reputation: 1095

How to get Three-letter-native-language-names?

A TwoLetterISOLanguageName, a ThreeLetterIsoLanguageName, a EnglishName, a NativeName, a DisplayName etc. are possible to get through CultureInfo.

e.g.:

Dim buffer As String = "IetfLanguageTag" & ControlChars.Tab & _
                       "TwoLetterISOLanguageName" & ControlChars.Tab & _
                       "ThreeLetterISOLanguageName" & ControlChars.Tab & _
                       "EnglishName" & ControlChars.Tab & _
                       "NativeName" & ControlChars.Tab & _
                       "Name" & ControlChars.Tab & _
                       "DisplayName" & _
                       Environment.NewLine

For Each ci As CultureInfo In System.Globalization.CultureInfo.GetCultures(CultureTypes.InstalledWin32Cultures)
   buffer &= ci.IetfLanguageTag & ControlChars.Tab & _
             ci.TwoLetterISOLanguageName & ControlChars.Tab & _
             ci.ThreeLetterISOLanguageName & ControlChars.Tab & _
             ci.EnglishName & ControlChars.Tab & _
             ci.NativeName & ControlChars.Tab & _
             ci.Name & ControlChars.Tab & _
             ci.DisplayName & _
             Environment.NewLine
Next
My.Computer.Clipboard.SetText(buffer)

But... Question !

How to get the Three-letter-native-language-names (like the ones in Windows 8.1; see the picture below)? Or are they stored somewhere in the registry or is it just a trim* of a NativeName?

(*) I'm not sure about trim, because of Japanese, for example.

Windows 8 Language bar

Thank you!

Upvotes: 2

Views: 165

Answers (1)

Eric MSFT
Eric MSFT

Reputation: 3276

They are not derived from the native names algorithmically. These are not exposed in any public API.

Upvotes: 1

Related Questions