當前位置: 首頁>>代碼示例>>VB.NET>>正文


VB.NET CultureInfo.TwoLetterISOLanguageName屬性代碼示例

本文整理匯總了VB.NET中System.Globalization.CultureInfo.TwoLetterISOLanguageName屬性的典型用法代碼示例。如果您正苦於以下問題:VB.NET CultureInfo.TwoLetterISOLanguageName屬性的具體用法?VB.NET CultureInfo.TwoLetterISOLanguageName怎麽用?VB.NET CultureInfo.TwoLetterISOLanguageName使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在System.Globalization.CultureInfo的用法示例。


在下文中一共展示了CultureInfo.TwoLetterISOLanguageName屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。

示例1: Example

' 導入命名空間
Imports System.Globalization

Module Example
   Public Sub Main()
      ' Get all available cultures on the current system.
      Dim cultures() As CultureInfo = CultureInfo.GetCultures(CultureTypes.AllCultures)

      Console.WriteLine("{0,-32} {1,-13} {2,-6}", "Display Name", 
                        "Name", "TwoLetterISOLanguageName")
      Console.WriteLine()
      For Each culture In cultures
         ' Exclude custom cultures.
         If (culture.CultureTypes And CultureTypes.UserCustomCulture) = CultureTypes.UserCustomCulture Then 
            Continue For
         End If
         
         ' Exclude all two-letter codes.
         If culture.TwoLetterISOLanguageName.Length = 2 Then Continue For
         
         Console.WriteLine("{0,-32} {1,-13} {2,-6}", culture.DisplayName,
                           culture.Name, culture.TwoLetterISOLanguageName)
      Next   
   End Sub
End Module
' The example output like the following:
'       Display Name                     Name          TwoLetterISOLanguageName
'       
'       Upper Sorbian                    hsb           hsb
'       Konkani                          kok           kok
'       Syriac                           syr           syr
'       Tamazight                        tzm           tzm
'       Filipino                         fil           fil
'       Quechua                          quz           quz
'       Sesotho sa Leboa                 nso           nso
'       Mapudungun                       arn           arn
'       Mohawk                           moh           moh
'       Alsatian                         gsw           gsw
'       Sakha                            sah           sah
'       K'iche                           qut           qut
'       Dari                             prs           prs
'       Upper Sorbian (Germany)          hsb-DE        hsb
'       Konkani (India)                  kok-IN        kok
'       Syriac (Syria)                   syr-SY        syr
'       Filipino (Philippines)           fil-PH        fil
'       Quechua (Bolivia)                quz-BO        quz
'       Sesotho sa Leboa (South Africa)  nso-ZA        nso
'       Mapudungun (Chile)               arn-CL        arn
'       Mohawk (Mohawk)                  moh-CA        moh
'       Alsatian (France)                gsw-FR        gsw
'       Sakha (Russia)                   sah-RU        sah
'       K'iche (Guatemala)               qut-GT        qut
'       Dari (Afghanistan)               prs-AF        prs
'       Lower Sorbian (Germany)          dsb-DE        dsb
'       Tamazight (Latin, Algeria)       tzm-Latn-DZ   tzm
'       Quechua (Ecuador)                quz-EC        quz
'       Quechua (Peru)                   quz-PE        quz
'       Sami, Lule (Norway)              smj-NO        smj
'       Sami, Lule (Sweden)              smj-SE        smj
'       Sami, Southern (Norway)          sma-NO        sma
'       Sami, Southern (Sweden)          sma-SE        sma
'       Sami, Skolt (Finland)            sms-FI        sms
'       Sami, Inari (Finland)            smn-FI        smn
'       Sami (Inari)                     smn           smn
'       Sami (Skolt)                     sms           sms
'       Sami (Southern)                  sma           sma
'       Lower Sorbian                    dsb           dsb
'       Sami (Lule)                      smj           smj
'       Tamazight (Latin)                tzm-Latn      tzm
開發者ID:VB.NET開發者,項目名稱:System.Globalization,代碼行數:69,代碼來源:CultureInfo.TwoLetterISOLanguageName


注:本文中的System.Globalization.CultureInfo.TwoLetterISOLanguageName屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。