Note that there are some explanatory texts on larger screens.

plurals
  1. POCreate Custom Cultures and then modify them using "Region and Language" dialog in Windows
    primarykey
    data
    text
    <p>I've just created and registered a new culture following the steps described in MSDN article: <a href="http://msdn.microsoft.com/en-us/library/ms172469.aspx" rel="nofollow">How to: Create Custom Cultures</a>.</p> <pre><code>var cib = new CultureAndRegionInfoBuilder(CultureName, CultureAndRegionModifiers.None); cib.LoadDataFromCultureInfo(new CultureInfo("cs-CZ")); cib.LoadDataFromRegionInfo(new RegionInfo("CZ")); cib.CultureNativeName = CultureNativeName; cib.CultureEnglishName = CultureNativeName; cib.NumberFormat.NumberDecimalSeparator = separator cib.Register(); </code></pre> <p>Everything looks just fine. I can see my new culture in "Region and Language" dialog in Windows. I can even load the culture back to my application. </p> <p>When I change something directly in "Region and Language" dialog in Control Panel (let say NumberDecimalSeparator should be dot "." instead of comma ",") and then try to retrieve the culture:</p> <pre><code>var ci = CultureInfo.GetCultureInfo(CultureName); ci.ClearCachedData(); ci = CultureInfo.GetCultureInfo(CultureName); </code></pre> <p>I've got still the same culture info I registered. Manual change is not projected in retrieved CultureInfo object.</p> <p>Is that a proper behaviour or Am I doing something wrong?</p> <p><strong>EDIT:</strong></p> <p>If I think about it again, it is obviously the problem that I am running application in IIS under different user account than the user who is changing the culture info in Control Panel, because it is a <strong>UserCustomCulture</strong> as I've noticed.</p> <p><strong>Correct question is, how can I register a culture to be common for all users (or at least for IIS user and some Admin user)?</strong></p> <p>The reasons why I want to do this:</p> <ol> <li>I want to be able to customize formatting used in the application.</li> <li>I don't want to create GUI equivalent to the one in Control Panel inside my Web Application.</li> <li>An administrator can simply set up formatting for the application in Control Panel.</li> </ol>
    singulars
    1. This table or related slice is empty.
    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.
 

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