Editing translations of an existing locale

European languages can be edited with a plain text editor. To edit Unicode language files such as Arabic (ar) or Chinese (zh), you must use an editor that supports UTF-8. If you use an editor that does not support UTF-8 to edit the Unicode files, they can become corrupt. We recommend that you perform a test edit and view the edited file in the web application before proceeding with a full translation.

These files are UTF-encoded and should only be edited with a UTF-8 capable text editor.

  • js/inforCommonUI.js
  • lang/lang.parent.js
  • lang/lang.ar.js
  • lang/lang.mr.js
  • lang/lang.zh.js

In addition, some of the inforControls and jQuery files are also UTF-8.

  1. Locate the translation file to edit.

    Translations for a given locale are stored in two places in the lang folder:

    • Each locale or locale variant has its own language file. These naming conventions are used for files:

      For a base language, the file name is lang.xx.js,

      where xx is the two-character ISO code in lowercase. For example, lang.fr.js for the French language file.

      • For a variant, the file name is lang.xx_yy.js, where xx is the two-character ISO language code of the parent language in lowercase, and yy is the two-character variant code in uppercase. For example, lang.fr_ca.js is the French Canadian variant language file.

        The variant language files contain all of the translation strings, including the strings where they vary from the parent language.

    • A small subset of the translation for each locale is stored in the lang.parent.js file and in the 'lang folder. The items in the lang.parent.js file are the strings that show in the main HTML frame that wraps the page. The parent-key is always CandidateHeaderMenu.

      The items in the lang.parent.js file with a parent-key of CandidateHeaderMenu also show in the lang.xx.js files.

  2. Open the language file to edit. Use a plain, non Unicode language, or UTF-enabled text editor.

    Each language string is displayed in this format:

    'key-parent.key' : 'value-for-language',

    For example,

    'Calendar.January' : 'Janvier',
  3. For each string that you want to translate or edit, specify the translation inside the apostrophes on the right-hand side. If your translation contains apostrophes, precede each one with a back slash.

    For example,

    'CandidateDescription.SaveToCart' : 'Ajouter à ma sélection d\'offres'
  4. Save the file.
  5. Open the lang.parent.js file with UTF-8 capable editor.
  6. Search for the first line of the locale you are translating. For example, if you are updating a French translation, search for
    TEXT['fr']
  7. Translate or edit the strings on the right-hand side.

    These translations must be identical to those you specified in the locale language file for strings with the CandidateHeaderMenu parent key.

  8. Save the file.