Country-Specific Translations

Resource files can also be set up to provide country-specific text strings.

For instance, you could provide translated strings for:

  • Spanish
  • Spanish (Spain)
  • Spanish (Mexico)

This is done somewhat differently for the “general” resource files (those that provide text strings used throughout the application) than it is for the “event” resource files (those that provide text strings used in the event view list and the Event Viewer), as described below.

General Resource Files

Country-specific text strings are embedded in the general resource files (for example, locale.es.xml) under separate key attributes.

For example, the following shows a locale.es.xml resource file that contains country-specific text strings for both Spain and Mexico:

<data jsxnamespace="propsbundle"
    <locale key="es">
      <!-- DEFAULT LANGUAGE RECORD ELEMENTS HERE -->
      ...
      <record jsxid="txtClose" jsxtext="Cierre"/>
      <record jsxid="txtOpen" jsxtext="Abierto"/>
      ...
    </locale>      
    <locale key="es_ES">
      <record jsxid="txtOpen" jsxtext="override value for Spain"/> 
    </locale>
    <locale key="es_MX">
      <record jsxid="txtOpen" jsxtext="override value for Mexico"/>
    </locale> 
</data>

The value in the key attribute identifies the language or the language and the country. These must be in the form:

ll

or

ll_CC

where:

The key value at the top of the file always identifies the general language, for example, Spanish (key=”es”). The text strings under that key are used when the general language is selected in the application (for example, Spanish).

The key values at the bottom of the file indicate there are override values that are country-specific: if Spanish (Spain) is chosen in the application, the strings under key=”es_ES” are used; if Spanish (Mexico) is chosen in the application, the strings under key=”es_MX” are used.

Event Resource Files

Country-specific text strings for events must be provided in a separate event resource file. For example, to provide translated strings for Spanish, Spanish (Spain), and Spanish (Mexico), the following event resource files must exist:

eventLocale.es.xml
eventLocale.es_ES.xml
eventLocale.es_MX.xml

Each of these files will contain all of the event text strings for the respective language/country. The names of these files must be in the form:

eventLocale.ll_CC.xml

where: