using System;
using System.Collections.Generic;
using System.Text;
using System.Globalization;

namespace CultureList
{
    class Program
    {
        static void Main(string[] args)
        {

            // get culture names
            List<string> list = new List<string>();
            foreach (CultureInfo ci in CultureInfo.GetCultures(CultureTypes.AllCultures))
            {
                string specName = "(none)";
                try { 
                    specName = CultureInfo.CreateSpecificCulture(ci.Name).Name;
                    list.Add(String.Format("{0,-12}\t{1,-12}\t{2,-40}\t{3}\t{4}\t{5}\t{6}", 
                        ci.Name, 
                        specName, 
                        ci.EnglishName, 
                        ci.NumberFormat.NumberGroupSeparator,
                        ci.NumberFormat.NumberDecimalSeparator, 
                        ci.NumberFormat.CurrencyGroupSeparator, 
                        ci.NumberFormat.CurrencyDecimalSeparator));
                }
                catch { }

                
            }

            list.Sort();  // sort by name

            // write to console
            Console.WriteLine("CULTURE\tSPEC.CULTURE\tENGLISH NAME\tN-GROUP\tN-DECIMAL\tM-GROUP\tM-DECIMAL");
            Console.WriteLine("--------------------------------------------------------------");
            foreach (string str in list)
                Console.WriteLine(str);

			Console.WriteLine("");		
			Console.WriteLine("");				
            Console.WriteLine("Informações de cultura corrente:");
            Console.WriteLine("--------------------------------------------------------------");				
            Console.WriteLine("System.Globalization.CultureInfo.CurrentCulture -->" + System.Globalization.CultureInfo.CurrentCulture);
            Console.WriteLine("System.Globalization.CultureInfo.CurrentUICulture -->" + System.Globalization.CultureInfo.CurrentUICulture);
            Console.WriteLine("System.Globalization.CultureInfo.InstalledUICulture -->" + System.Globalization.CultureInfo.InstalledUICulture);

            Console.ReadLine();

        }
    }
}
