<ProgramFilesX64>\Microsoft SDKs\Azure\.NET SDK\v2.9\bin\plugins\Diagnostics\Newtonsoft.Json.dll <RuntimeDirectory>\System.ComponentModel.Composition.dll <RuntimeDirectory>\System.ComponentModel.dll <RuntimeDirectory>\System.Net.dll <RuntimeDirectory>\System.Net.Http.dll Amazon.Lambda.S3Events AWSSDK.Core AWSSDK.S3 TimeZoneNames Amazon Amazon.Auth.AccessControlPolicy Amazon.Auth.AccessControlPolicy.ActionIdentifiers Amazon.Internal Amazon.Lambda.S3Events Amazon.MissingTypes Amazon.Runtime Amazon.Runtime.CredentialManagement Amazon.Runtime.CredentialManagement.Internal Amazon.Runtime.EventStreams Amazon.Runtime.EventStreams.Internal Amazon.Runtime.Internal Amazon.Runtime.Internal.Auth Amazon.Runtime.Internal.Settings Amazon.Runtime.Internal.Transform Amazon.Runtime.Internal.Util Amazon.Runtime.SharedInterfaces Amazon.Runtime.SharedInterfaces.Internal Amazon.S3 Amazon.S3.Encryption Amazon.S3.Encryption.Internal Amazon.S3.Internal Amazon.S3.IO Amazon.S3.Model Amazon.S3.Model.Internal.MarshallTransformations Amazon.S3.Transfer Amazon.S3.Util Amazon.Util Amazon.Util.Internal Amazon.Util.Internal.PlatformServices Newtonsoft.Json Newtonsoft.Json.Converters Newtonsoft.Json.Linq Newtonsoft.Json.Schema Newtonsoft.Json.Serialization System System.ComponentModel.Composition System.ComponentModel.Composition.Hosting System.ComponentModel.Composition.Primitives System.ComponentModel.Composition.ReflectionModel System.Diagnostics System.Diagnostics.Tracing System.Globalization System.IO.Compression System.Net.Http System.Net.Http.Headers System.Numerics ThirdParty.BouncyCastle.Asn1 ThirdParty.BouncyCastle.Asn1.Utilities ThirdParty.BouncyCastle.Math ThirdParty.BouncyCastle.OpenSsl ThirdParty.BouncyCastle.Utilities.IO.Pem ThirdParty.Ionic.Zlib ThirdParty.Json.LitJson ThirdParty.MD5 TimeZoneNames void Main() { var currentCulture = System.Threading.Thread.CurrentThread.CurrentCulture; // Get server DateTime. DateTime date = DateTime.Now; var amount = 12345.67M; // Get a list of all Cultures List cultures = CultureInfo.GetCultures(CultureTypes.SpecificCultures) //.Where(ci => ci.Name == "en-MW") .ToList(); // Add the Cultures to an ArrayList so we can sort them Alphabetically by name. List cultureList = new List(); foreach (CultureInfo culture in cultures) { System.Threading.Thread.CurrentThread.CurrentCulture = culture; RegionInfo regionInfo = default(RegionInfo); if (culture.LCID != 4096 && !culture.Equals(CultureInfo.InvariantCulture)) { regionInfo = new RegionInfo(culture.LCID); } string pattern = null; switch (culture.NumberFormat.CurrencyPositivePattern) { case 0: pattern = "{0}{1:N" + culture.NumberFormat.CurrencyDecimalDigits + "}"; break; case 1: pattern = "{1:N" + culture.NumberFormat.CurrencyDecimalDigits + "}{0}"; break; case 2: pattern = "{0} {1:N" + culture.NumberFormat.CurrencyDecimalDigits + "}"; break; case 3: pattern = "{1:N" + culture.NumberFormat.CurrencyDecimalDigits + "} {0}"; break; } cultureList.Add(new CultureData { EnglishName = culture.EnglishName, Name = culture.Name, Details = new CultureDetails { ShortDate_Format = culture.DateTimeFormat.ShortDatePattern, ShortDate_Example = date.ToShortDateString(), LongDate_Format = culture.DateTimeFormat.LongDatePattern, LongDate_Example = date.ToLongDateString(), ShortTime_Format = culture.DateTimeFormat.ShortTimePattern, ShortTime_Example = date.ToShortTimeString(), LongTime_Format = culture.DateTimeFormat.LongTimePattern, LongTime_Example = date.ToLongTimeString(), Currency_EnglishName = regionInfo?.CurrencyEnglishName ?? string.Empty, Currency_NativeName = regionInfo?.CurrencyNativeName ?? string.Empty, Currency_Format = pattern, Currency_Example = string.Format(culture, "{0:C}", amount), Currency_ExampleNeg = string.Format(culture, "{0:C}", (amount * -1)), Currency_ExampleAlt = string.Format(culture, "{0:c}", amount), Currency_ExampleAltNeg = string.Format(culture, "{0:C}", (amount * -1)), Percentage_Format = $"{{{culture.NumberFormat.PercentPositivePattern}{culture.NumberFormat.PercentDecimalSeparator}{culture.NumberFormat.PercentDecimalDigits}:P}}", Percentage_Symbol = culture.NumberFormat.PercentSymbol, Percentage_Example = string.Format(culture, "{0:P}", .333) }, MonthNames = MonthNames(culture), // TimeZones = TimeZones(currentCulture) }); } // Sort Cultures //cultureList.Sort(new StringComparer()); cultureList //.Where(l => l.Details.Percentage_Symbol != "%") .OrderBy(c => c.EnglishName) //.Where(c => c.EnglishName.Contains("Bermuda")) .Dump(nameof(cultureList)); currentCulture = CultureInfo.GetCultures(CultureTypes.SpecificCultures).FirstOrDefault(c => c.EnglishName == "English (United States)"); System.Threading.Thread.CurrentThread.CurrentCulture = currentCulture; } class CultureDetails { public string ShortDate_Format { get; set; } public string ShortDate_Example { get; set; } public string LongDate_Format { get; set; } public string LongDate_Example { get; set; } public string ShortTime_Format { get; set; } public string ShortTime_Example { get; set; } public string LongTime_Format { get; set; } public string LongTime_Example { get; set; } public string Currency_EnglishName { get; set; } public string Currency_NativeName { get; set; } public string Currency_Format { get; set; } public string Currency_Example { get; set; } public string Currency_ExampleNeg { get; set; } public string Currency_ExampleAlt { get; set; } public string Currency_ExampleAltNeg { get; set; } public string Percentage_Format { get; set; } public string Percentage_Symbol { get; set; } public string Percentage_Example { get; set; } } class CultureData { public string EnglishName { get; set; } public string Name { get; set; } public IDictionary MonthNames { get; set; } public CultureDetails Details { get; set; } public IEnumerable TimeZones { get; set; } } public IDictionary MonthNames(CultureInfo culture) { return Enumerable.Range(1, 12).ToList() .Select(mm => new { Key = mm, Value = culture.DateTimeFormat.GetMonthName(mm) }) .ToDictionary(item => item.Key, item => item.Value); } public IEnumerable TimeZones(CultureInfo culture) { return TimeZoneInfo.GetSystemTimeZones(); } public void TimeZoneList(CultureInfo culture) { TimeZoneInfo.GetSystemTimeZones() .SelectMany(tzi => new[] { TZNames.GetAbbreviationsForTimeZone(tzi.Id, culture.Name).Daylight != TZNames.GetAbbreviationsForTimeZone(tzi.Id, culture.Name).Standard ? new { Key = tzi.Id.Replace("Standard", "Daylight"), Value = TZNames.GetAbbreviationsForTimeZone(tzi.Id, culture.Name).Daylight } : new { Key = tzi.Id, Value = TZNames.GetAbbreviationsForTimeZone(tzi.Id, culture.Name).Daylight }, new { Key = tzi.Id, Value = TZNames.GetAbbreviationsForTimeZone(tzi.Id, culture.Name).Standard }}) .GroupBy(x => x.Key) .Select(g => g.First()) .ToDictionary(item => item.Key, item => item.Value) .OrderBy(item => item.Key) .Dump(); }