Using Custom Culture to Set Euro for Croatia

Shawn Steele

Croatia has adopted the Euro.  There are a couple of ways to update Windows to use the Euro symbol or currency for Croatian locales.

If Croatian is the current user default locale, then the simplest is to change the desired currency symbol and number formats in the Region control panel (intl.cpl).  Note that this only works for applications requesting the current default user locale, and may not be sufficient in all cases.

For applications that depend on the Windows locale data, a “Custom Locale” can be created and used on Windows versions 7 and above.  The “Custom Locale” support allows for administrators to specify the default data for locale(s) as needed for their needs.

The Microsoft Locale Builder tool is used to generate the desired custom locales.  Once the data is set appropriately, there is an option to “Build Locale Zip File”, which provides a short script and files used to install the updated locale.

Custom locales are supported on Windows 7 and above.  Custom locales are only used by applications that use the Windows NLS locale data, some applications that use different data stores for locale data may not respect the custom settings.

Custom locales may be installed on desktop or server environments.

Creating a Custom Locale

Creating a custom locale is fairly straightforward.  Custom locales are recognized by applications using Windows NLS data in Windows 7 and above.

  1. Download and install Locale Builder 2.0 https://www.microsoft.com/en-us/download/details.aspx?id=41158
  2. Open an existing locale, eg: Croatian (Croatia)
  3. Modify the desired fields, in this case on the Currency tab change:
    • Currency Names and Symbols
    • Positive and Negative Formatting patterns
  4. Generate the “Build Locale Zip File”
  5. Repeat for the neutral (Croatian) locale if desired

Installing Custom Locales

To install the resulting custom cultures on a target machine, the batch file will need to be run as an administrator.

  1. Extract the zip file(s) to a working directory on target machine.
  2. Open an elevated command prompt
  3. Switch to the directory with the extracted files
  4. Run InstallLocales.cmd

Open applications may need to be restarted, or the machine rebooted, to pick up all of the new custom locale values.

If multiple locales are to be installed, all of the data files may be combined in a single folder.  InstallLocales.cmd will install all of the locales provided.

Example LDML Data

You can also load an LDML file into the Locale Builder.  Here are some example LDML files that contain overrides for the Euro for Croatian

LDML for Croatian (Croatia) Euro support

Copy this to a file “hr-HR.ldml” and open that with the Microsoft Locale Builder, then build the zip installer.

<?xml version="1.0" encoding="utf-8"?>
<ldml>
  <identity>
    <special xmlns:msLocale="http://schemas.microsoft.com/globalization/2004/08/carib/ldml">
      <msLocale:cultureAndRegionInfoName type="hr-HR" />
    </special>
  </identity>
  <numbers>
    <special xmlns:msLocale="http://schemas.microsoft.com/globalization/2004/08/carib/ldml">
      <msLocale:currencyPositivePattern type="3" />
      <msLocale:currencyNegativePattern type="15" />
    </special>
    <currencies>
      <currency type="default">
        <symbol>€</symbol>
        <displayName>euro</displayName>
        <special xmlns:msLocale="http://schemas.microsoft.com/globalization/2004/08/carib/ldml">
          <msLocale:isoCurrency>EUR</msLocale:isoCurrency>
          <msLocale:currencyEnglishName>Euro</msLocale:currencyEnglishName>
        </special>
      </currency>
    </currencies>
  </numbers>
</ldml>

LDML for Croatian (neutral locale) Euro support

Copy the following to a file “hr.ldml” and open that with the Microsoft Locale Builder, then build the zip installer.  Note that this is identical to the previous example, the only difference is in the identity tag.

<?xml version="1.0" encoding="utf-8"?>
<ldml>
  <identity>
    <special xmlns:msLocale="http://schemas.microsoft.com/globalization/2004/08/carib/ldml">
      <msLocale:cultureAndRegionInfoName type="hr" />
      <msLocale:cultureAndRegionModifier type="neutral" />
    </special>
  </identity>
  <numbers>
    <special xmlns:msLocale="http://schemas.microsoft.com/globalization/2004/08/carib/ldml">
      <msLocale:currencyPositivePattern type="3" />
      <msLocale:currencyNegativePattern type="15" />
    </special>
    <currencies>
      <currency type="default">
        <symbol>€</symbol>
        <displayName>euro</displayName>
        <special xmlns:msLocale="http://schemas.microsoft.com/globalization/2004/08/carib/ldml">
          <msLocale:isoCurrency>EUR</msLocale:isoCurrency>
          <msLocale:currencyEnglishName>Euro</msLocale:currencyEnglishName>
        </special>
      </currency>
    </currencies>
  </numbers>
</ldml>