Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Replacing a specific culture.</p> <pre><code>var cultureBuilder = new CultureAndRegionInfoBuilder( "kl-GL", CultureAndRegionModifiers.Replacement); cultureBuilder.LoadDataFromCultureInfo(new CultureInfo("kl-GL")); cultureBuilder.GregorianDateTimeFormat.MonthNames = new [] { "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "okt", "nov", "dec", string.Empty // needs to be here!!! }; cultureBuilder.Register(); </code></pre> <p>Don't execute this! It will overwrite your culture settings. Adjust as you need it.</p> <p>Creating a new specific culture.</p> <pre><code> static void Main(string[] args) { try { var builder = new CultureAndRegionInfoBuilder( "kl-GL-custom", CultureAndRegionModifiers.None); // bind the properties builder.LoadDataFromCultureInfo(new CultureInfo("kl-GL")); builder.LoadDataFromRegionInfo(new RegionInfo("kl-GL")); // make custom changes to the culture builder.GregorianDateTimeFormat.MonthNames = new [] { "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "okt", "nov", "dec", string.Empty // needs to be here!!! }; // one time operation! needs admin rights! builder.Register(); } catch { } Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = new CultureInfo("kl-GL-custom"); Console.WriteLine(DateTime.Today.ToString("MMMM")); } </code></pre> <p>Using the new culture in ASP.NET is as trivial as adding this to your web.config: </p> <p>&lt;globalization culture="kl-GL-custom" uiCulture="kl-GL-custom"/></p> <p>or do this</p> <pre><code> protected override void InitializeCulture() { Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = new CultureInfo("kl-GL-custom"); base.InitializeCulture(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload