Documentation

Messages and Cultures

Each time the Builder generates the application, it produces a translations.default.json file.

Available Fields

The <webapp_directory>/artifacts/translations/translations.default.json file contains the translatable application strings in the default culture and lists them in a hierarchical order. For example, modules > views > components.

Under its "language" entry, each translations.default.json lists the following fields:

  • "label"—Indicates the name of the language as it will appear in the drop-down language-selection list of the generated project.
  • "culture"—Indicates the culture locale convention that will apply to the date, time, and number entries in the generated project.
  • "order"—Indicated the order in which the languages will be listed in the drop-down language-selection list of the generated project.

Applying Translations and Cultures

To translate the application messages and change the culture:

  1. Go to <webapp_directory>/artifacts/translations/.
  2. Copy the translations.default.json file in the same directory.
  3. Rename it while keeping its .json extension. For example, set the name to translations.german.json.
  4. Open translations.german.json.
  5. Update the "label" property. For example, replace the default "English" entry with "Deutsch".
  6. Update the "culture" property. For example, replace the default "en-US" entry with "de-DE".
  7. Update the "order" property. For example, replace the default "0" entry with "1".
  8. To translate the available application messages, replace all translatable default strings with their respective translations in the desired language. For example, if you have a Customers field, replace "Customers" with "Kunden".
  9. Save the file.
  10. Generate the application once again to apply the new translations.

The web project generation updates only the translations.default.json file. This means that if you add any new sections to your web project after you have changed the culture and translated the messages, you need to manually copy and paste the strings from the new section to the specific language file. For example, if you have already created the translations.german.json file and translated its strings, and then add a new Emails module and generate the application, you have to copy the translatable Emails strings from translations.default.json to translations.german.json, and translate its messages.

Changing Default Settings

The "language" entry in the translations.default.json file contains a "label" field with the "English" default value and a "culture" field with the en-US default value.

The default translations are overridden each time you generate the application and users will lose all changes they might have made in this file.

To change the default values:

  1. On the Dashboard, click the card (or list item) of the application to open the App Design page.
  2. Next to the application name, click the Settings icon to open the drop-down options list.
  3. Select Properties to open the Edit App dialog box.
  4. In Edit App, update the Language Label and Language Culture properties.
  5. Click Save to save or Cancel to discard your changes.
  6. Click Generate to generate the application and apply the default label and culture.
In this article