Localization

Nitro's built-in language support allows blocks and APIs to work in collaboration with user-facing content translations to achieve a fully 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: Bunchball Go can be used globally but does not support localization in the front-end UI.

Enable Localization and Translate Program Content

Step 1: Enable localization in Nitro Studio. Show detailsClosed

  1. Open Nitro Studio > Configuration > Localization.
  2. In the Enable Locales list, select the locales your site is using.

 

Step 2: Translate your mission information, levels, exchanges, and other program content. Show detailsClosed

An Excel or XML translation file is used to localize program content. Each locale you choose to support has its own translation file which is managed in Nitro Studio. Translation text within the Excel or XML file must be in Ascii format.

  1. Open Nitro Studio > Configuration > Localization.

  2. Under Translate Content:

    1. Select Excel or XML as your file type.

    2. In the Download Translation File list, select the language file you want to download.

    3. Click Download.

  1. Update the value field for every value you want to localize and save the file.

  2. When you've finished translating your content, open the Localization page and click Upload Translation File.

  1. Repeat steps 2-4 for each language your program supports.

  2. As your program grows, you will need to repeat this process to translate new content.

Note: 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.

 

Translate User Facing Elements

Nitro Impact and Blocks

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

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.

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

Show me an example embed codeClosed

 

 

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

A separate translation key exists for each block and includes the strings needed for a full translation of the individual block. This information will change as a block is updated and text is added or changed. Not that tokens like "{{balance}}" should not be translated.

Download the current translation key in the Block Builder for the block you want to translate.

Show me a translation keyClosed

Show me a translated exampleClosed

See also

Site settings