Locale

The locale is a setting that can affect date, time and currency output, and other formatting that depends on location and language. This setting is specific to each template, so changing it for one template will not affect other templates.

Assume that a record set has a Date field that contains the following date: 4/11/12, and that this field has been added to the template using the Text Script Wizard with the Long Date format (see Using the Text Script Wizard and Formatting variable data). If the locale is set to en-US, the date appears on the page as April 1, 2016. Setting the locale to fr-CA makes this text appear as 1 avril 2016. Setting it to zh-CN will print 2016年4月1日.

The locale can also be used in scripts; see Writing your own scripts and Standard Script API.

Changing the locale

By default, the locale is the same as the operating system's locale setting. To change this setting for the currently open template:

  1. On the menu, select Edit > Locale.
  2. Use the drop-down to select how the locale is to be set for the current template:
    • Select System Locale to use the operating system's locale settings. The operating system's locale is set in the Region settings of the control panel. Note that when output is generated on a different operating system, that operating system's locale will be used.
    • Select Explicit Locale to specify a static locale which will remain static for this template, whichever server the template is used on. Use the Locale drop-down to select a specific locale. The locales comprise a language code followed by a 2-letter country code (de-DE, zh-CN, fr-CA, fr-FR, etc), as defined by the international standards ISO-639-1 and ISO 3166.
    • Select Data Field to use a data field from the record. The locale will be record-specific in this case. Use the drop-down to select a field within the current Data Model that contains the locale. This field must be a string and contain the exact locale to be used, such as "en" or "fr-CA". It cannot be an alias such as "english" or "french". The locale supports language codes (en, fr, etc), as well as language codes followed by a 2-letter country code (de-DE, zh-CN, fr-CA, fr-FR, etc). The language codes are defined by ISO-639-1. The 2-letter country code as defined by ISO 3166.
  3. Click OK to apply the setting. The setting will be saved with the template.