Create localization resource files - SmartPlant Foundation - IM Update 46 - Help - Hexagon

SmartPlant Foundation Web Client Help

Language
English
Product
SmartPlant Foundation
Search by Category
Help
SmartPlant Foundation / SDx Version
10

Web Client supports the localization of the client user interface into different languages. The strings used for the display of each language in the user interface are stored in a JSON file in the Web Client site directory.

You must use the same language resource as set in the language preferences in your browser setting.

To create a new language JSON file:

  1. Locate the English language en.json file. For example, located at: C:\SmartPlant Foundation Server Files\SPFWebClient_Sites\Site Name\content\lang\core.

  2. Copy the en.json file, and save to another folder.

    SHARED Tip Save a second copy of the en.json file so that you can compare your old en.json file with the new one that you receive when you update. For more information, see Update localization resource files.

  3. Rename the copied en.json file to match the language requiring the translation. For example, if you are translating to French, rename the file to fr.json.

    SHARED Tip For other language codes, see the latest online JSON language documentation.

  4. Open the renamed JSON file, such as fr.json, and translate the Web Client strings into the language. For example, on your localized device, edit each line into the new language using Notepad ++.

  5. Each entry in the JSON file consists of a key-value pair. The key must not be translated as it is used to retrieve the translation. Only the value should be translated.

    For example, given the following key-value pair:

    "RELATE_OBJECTS_TO_WORK_AREA_DEFINITION_CANCEL_MESSAGE": "Completion of the Work Area Definition {0} has been cancelled"

    • RELATE_OBJECTS_TO_WORK_AREA_DEFINITION_CANCEL_MESSAGE is the key and must not be modified.

    • Translate the following value: "Completion of the Work Area Definition {0} has been cancelled".

    • Any placeholders used in the original text value (indicated by {} with a number inside) should remain in the translated text in the appropriate location.

    • The placeholder {0} must be left in the same location in the newly translated value.

  6. Save the translated language JSON file, such as fr.json, to the same location as the existing en.json file.

    If your browser is setup for the French language, it now reads the fr.json file and displays the translated strings in the Web Client.