Portal Translations
Enable multiple languages for the Developer Portal Application

Creating translations

In order to provide translations to the Portal application, you can add the translations using the Language Resource in the Form.io Portal Base Project. This resource has the following structure:
Within this resource, we have the following fields:
  • A Text Field called Language, which represents the language name.
  • A Text Field called Language code, which is a shorthand alias for the language.
  • A Data Map component called Translations, that has 2 fields: Text field for keys and one for translations.
A list of the keys can be found in the Translations JSON file, which is provided separately, where every chunk of text in the Portal Application is matched by a key with a meaningful name. By default, every key represents an English translation.
You can create a new submission for each translation like the following screenshot, which illustrates a submission for Spanish language:
Once you've created a submission in the Language resource, a new "language" is created. This is what will be used to manage all of the translations so you can now input the rest of your language translations the same way until you have multiple to chose from.

Dynamic language switch

When you have multiple languages created, the Language switch dropdown appears in the navigation bar.
Here you can select any language from the list of languages you have configured. The currently selected language is highlighted as shown below.
Selecting a new language will trigger a language change for all of the keys that were provided with translation in the submission for that particular language.