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.Write("        Months:  ");
                                foreach  (string  m  in  ci.DateTimeFormat.MonthNames)
                                        sw.Write(",  {0}",  m);
                                sw.WriteLine();
                        }
                }
        }
}
    
   
  
   



Output

Months: , January, February, March, April, May, June, July, August, September, October, November
, December,
    Months: , January, February, March, April, May, June, July, August, September, October, November
, December,
    Months: , enero, febrero, marzo, abril, mayo, junio, julio, agosto, septiembre, octubre, noviemb
re, diciembre,
    Months: , Januar, Februar, M?rz, April, Mai, Juni, Juli, August, September, Oktober, November, D
ezember,
    Months: , 1?, 2?, 3?, 4?, 5?, 6?, 7?, 8?, 9?, 10?, 11?, 12?,


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo I18N Internationalization
» Culture Format