You can create a culture through .Net using the CultureAndRegionInfoBuilder class. Since this code must be run with administrator privileges, it is usually recommended that you run it as a separate program or script that runs as part of the software installation phase. After setting it up, you can use it like any other Culture.
This example is based on an example in the book Foundation Foundation Development Development Foundation (2nd ed. P697):
var builder = new CultureAndRegionInfoBuilder("en-PL", CultureAndRegionModifiers.None); builder.LoadDataFromCultureInfo(new CultureInfo("en-US")); builder.LoadDataFromRegionInfo(new RegionInfo("US")); builder.CultureEnglishName = "Pig Latin"; builder.CultureNativeName = "Igpay Atinlay"; builder.IsMetric = true; builder.ISOCurrencySymbol = "PLD"; builder.RegionEnglishName = "Pig Latin Region"; builder.RegionNativeName = "Igpay Atinlay Egionray"; builder.Register();
After that, you can restore your culture in the program.
var culture = new CultureInfo("en-PL");
Matt
source share