Skip to main content

Translations

The text of an app can be quickly translated into different languages. English, Czech, Slovak and German are currently available.

The language of the application is determined by the user's browser preferences. If the preferred language is not available, the application uses its default language.

To select the language in which the app was created, click Add language. The drop-down menu displays the available languages into which the original text can be translated.

Two tabs will appear to show the strings used in the app: User Interface and Codebooks. Each tab displays a column of strings for the original language and a column with empty fields for the new language. Add the translations.

To get started, you can use online translators. We suggest using DeepL. Click Copy next to the name of the original language, paste it into the translator, copy the result, click the first field of the translation, and paste.

Custom translations

Custom translations allow you to create translated strings that are accessible in code through App.Translations.MyCustomTranslation. This feature is very useful for translating strings in various custom label expressions, notification boxes, command results, and more.

Groups

For better clarity, you can use groups. When you specify a group (let's say Group1) for the custom translation, it will be accessible at App.Translations.Group1.

Formatting

A translation can be used as a formatting string using the String.Format() method. Define formatting fields with numbers from 0 up to n (can repeat), and then supply n - 1 arguments.

FormatExample

The translation is configured as follows:

English: "{0} / {1} Customers are active. (in db: {1})"
Czech: "{0} {1} {0} Test translation"

Executing this command:

(model, db, ctx) =>
{
var active = db.CustomerSet.Where(x => x.Status == ExampleCodebook.ACTIVE).Count();
var total = db.CustomerSet.Count();

return new CommandResult(true, string.Format(App.Translations.Customers.customers_active, active, total));
}

Will result in the following, depending on the browser locale.

FormatOutput1 FormatOutput2

Examples

Known issues

Conflicting changes

When editing a translation for an entity while changes are being made to the same entity, translations can overwrite these changes. For this reason, you are required to close all your tabs before editing the translations.

This is not enforced when multiple users are working on the same app, and can lead to lost changes.

Cannot open translations with closed tabs

To resolve this issue, simply open any tab, close it, and try again.