Localization

Nitro's built-in language support allows blocks and APIs to work in collaboration with user-facing content translations to achieve a translated program. Show me a diagram of the localization processClosed

Localization Process Diagram

To translate your program, you will need to:

  1. Enable localization. Show me supported localesClosed

  1. Translate your program content such as missions, levels, and recognitions.

  2. Translate your front-end UI. This front-end may be blocks or a custom program created with APIs.

Note: When testing a localized program, you may need to verify in a Production environment as Sandbox does not show all characters correctly.

Enable Locales and Translate Program Content

Each locale you choose to support has its own translation file, in JSON format, which is managed in Nitro Studio. This file translates your mission information, levels, exchanges, and other program content. Show detailsClosed

  1. Open Nitro Studio > Configuration > Localization.
  2. In the Locales list, click the Enable Locale button (Enable Locale Button) for a locale your program supports.
  3. Under Enabled Locales, click the Download Localization File button (Download Button) for the enabled language.
  1. In the translation file, update the translatedValue field for every value you want to localize and save the file.
  2. When you've finished translating your content, return to the Nitro Studio Localization page, add the file in the Translation Upload section, and then click Upload.
  1. Repeat steps 2-5 for each language your program supports.
    If you upload a translation file and then download via the same browser, the file may not contain all translations until you refresh the cache.

As your program grows, you will need to repeat steps 3-5 to translate new content.

Translate User Facing Elements

Blocks

Complete the following to translate your program. Note: Impact can be used globally but does not support localization of quizzes.

See Translation Keys for the steps needed to update your localized blocks when new features are added to Nitro.

Step 1: Translate blocks. Show detailsClosed

Each block requires its own translation file which is managed in Nitro Studio. JSON is the only supported file type for blocks.

  1. Open Integrate > Blocks > click the block you want to localize.

  2. Click the Languages drawer and then click Download.

  3. Update the localization file to include all language codes and translations for each language in your program.

  4. Upload the updated localization file to the Languages drawer and click Save.

    The languages in your file will display in the drawer. Click a language in the list to preview the translations.

Step 2: Modify each block's embed code. Show detailsClosed

Add the "language" attribute and the language code to the block embed code in the src URL.

The "language" attribute accepts one or multiple values (e.g. language=es-MX,es-ES). If you have multiple languages, use a token that can be replaced at runtime with the user's language code.

Show me an example embed codeClosed

Impact+

Complete the following to translate your program. Note: Impact+ can be used globally but does not support localization of quizzes.

See Translation Keys for the steps needed to update your localized blocks when new features are added to Nitro.

Step 1: Translate all blocks. Show detailsClosed

Each block requires its own translation file which is managed in Nitro Studio. JSON is the only supported file type for blocks.

  1. Open Integrate > Blocks > click the Impact block you want to localize.

  2. Click the Languages drawer and then click Download.

  3. Update the localization file to include all language codes and translations for each language in your program.

  4. Upload the updated localization file to the Languages drawer and click Save.

    The languages in your file will display in the drawer. Click a language in the list to preview the translations.

  5. If your program includes recognitions, repeat steps 1-4 for the Recognitions block.

  6. Open Integrate > Impact+ and repeat steps 2-4 for the Impact+ block.

Step 2: Translate the Impact+ site Show detailsClosed

  1. In the Impact+ Languages drawer, select Display region if you want to show the language and region in the user's language selection list.

  2. When a user logs in to Impact+, they will be prompted to select a language. The language selection list includes the languages enabled in the Localization view. If the site has only one language enabled, the language selection list is hidden.

  3. The user's selected language is stored as a preference and Impact+ will read the preference and translate the site when the user logs in.
    You can also set a user's language preference in the Users view or by uploading via data import.

Custom Programs

When translating a custom program created using APIs, you can use Nitro APIs to return the localized data you uploaded to Nitro Studio for mission, levels, etc. Then, UI elements will require additional translation with your custom build.

 

Step 1: Translate custom elements created using APIs. Show detailsClosed

  1. Use the Localization view in Nitro Studio to find your language code. Use a 2-digit code to translate into the base language and a 4-digit code to translate into the locale.

  2. Add the "Accept-Language" header and language code to all your API calls.

The header is required on every API call as each is a single transaction and there is no session data.

 

Step 2: Translate quizzes. Show detailsClosed

Quiz content (quiz name, questions, and answers) is translated as flat text.

Translation overrides are EXACT matches on the quiz content including the quiz title and description, question text, and answer text. Matches are case-sensitive.

  1. Create a translation schema containing your quizzes, their questions, and their answers (or add quizzes to your existing translation schema). No quiz, question, or answer IDs are needed.

  2. If you're translating into multiple languages, add a custom override for each language your program supports.

  3. Add the "data-translation-reference" attribute to reference your translation schema.

Show me an example scriptClosed

 

 

Translation Keys

Each block has its own translation key containing all the strings required for a complete translation of that block. Do not translate tokens such as "{{balance}}".

As new features are added to a block, you must update your translation file to include the new strings. Nitro does not automatically merge new strings into your existing translation file. Show detailsClosed

  1. Open Integrate > Blocks > click the block you want to update.

  2. Click the Languages drawer and then click Download. This downloads the block's current translation file.

  3. Return to the Blocks list view, click New, and select the block type you need to update.

  4. Click the Languages drawer and then click Download. This downloads the default translation key.
    You can close the new block without saving.
  5. Compare your current translation file (from step 2) with the default translation file (from step 4) to find new strings that need to be translated.
  6. Translate any new strings and then merge the new strings into your current translation file (from step 2).
  7. Upload the new localization file to your block using the Languages drawer.

Show me an example translation keyClosed

Show me a translated exampleClosed

See also

Site settings