当前位置: 首页>>代码示例>>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;未经允许,请勿转载。