Culture information : Culture Format : I18N Internationalization C# Examples


C# Examples » I18N Internationalization » Culture Format »

 

Culture information









    
using  System;
using  System.Collections;
using  System.Collections.Generic;
using  System.IO;
using  System.Reflection;
using  System.Resources;
using  System.Text;
using  System.Threading;
using  System.Globalization;

public  class  MainClass
{
        public  static  void  Main()
        {
              string[]  cultures  =  new  string[]  {  "en-US",  "en-GB",  "es-MX",  "de-DE",  "ja-JP"  };

                using  (TextWriter  sw  =  Console.Out)
                {
                        foreach  (string  c  in  cultures)
                        {
                                CultureInfo  ci  =  new  CultureInfo(c);
                                sw.WriteLine("{0}:  {1}",  ci.Name,  ci.DisplayName);

                                sw.WriteLine("        English  Name:  {0}",  ci.EnglishName);
                                sw.WriteLine("        Native  Name:  {0}",  ci.NativeName);
                                sw.WriteLine("        LCID:  {0}",  ci.LCID);

                        }
                }
        }
}
    
   
  
   



Output

en-US: English (United States)
    English Name: English (United States)
    Native Name: English (United States)
    LCID: 1033
en-GB: English (United Kingdom)
    English Name: English (United Kingdom)
    Native Name: English (United Kingdom)
    LCID: 2057
es-MX: Spanish (Mexico)
    English Name: Spanish (Mexico)
    Native Name: Espa?ol (M?co)
    LCID: 2058
de-DE: German (Germany)
    English Name: German (Germany)
    Native Name: Deutsch (Deutschland)
    LCID: 1031
ja-JP: Japanese (Japan)
    English Name: Japanese (Japan)
    Native Name: ??? (??)
    LCID: 1041


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo I18N Internationalization
» Culture Format