Klevr Product Documentation logo

Multilingual Configuration

Klevr portal relies on Umbraco's multilingual features to help serve a multilingual portal.

Feature Overview

Klevr portal relies on Umbraco's multilingual features to help serve a multilingual portal. These include page specific translations, a dictionary for ad hoc messages and the language section in settings. Klevr portal also applies the current language selection to Klevr Forms rendered with SurveyJS, so these forms can have additional languages added to them in the Dynamics CE Form Editor.

Assumptions

  1. You have a translator available to translate all content for all pages and all dictionary items.

Dependencies

The following are dependencies for this feature:

  1. Portal version 2.27.0 or higher.

Preparation

Ensure you have all the dictionary items loaded. If you navigate to Umbraco -Translation you should see hundreds of entries under the portal header. If you don't then follow these steps:

Do a usync clean export after importing settings, then download the zip file from klevr settings, then add the dictonary folder found in the translate folder under klevr portals on the Klevr CE teams channel into the zip file. Import the zip file through klevr settings, then run a usync report on content to ensure the only changes are the new dictionary items, and then import the content.

Process for applying another language

1
Add a secondary language

The first step is to add a secondary language to Umbraco by navigating to the backoffice, then settings then languages.

Process for applying another language (1)

Process for applying another language (1)

Keep English as the default language, and add any addtional languages you want.

2
Translate all of the pages

Next step is to translate all of the pages. When you translate a page, the split view is very handy for comparing different languages. Navigate to content, select a page, and then click on the dropdown next to the page name, hover over the second language and select open in split view:

Process for applying another language (2)

Process for applying another language (2)

Output specific fields will be editable in the second language, but non-translatable fields will be inherited from the default page. For instance the "Allow Share" option is not a language specific toggle, you can't opt to allow share in one language and not in another, but the title and description, which is shown to the user, is translatable. Each of the content properties can be configured to be translatable or not. If you find we have missed any, please log it and we will update them.

3
Translate dynamics forms and lists

For the dynamics forms and lists, the entire form section had to be marked as translatable, because of the way the controls work in Umbraco. The easiest way to translate these sections are by copying the items to the Umbraco clipboard from the default language, and paste them to the secondary language page, and then update the labels etc. For views and subgrids we had to make them translatable so that the fetchxml can be modified to contain translated column names. Keep in mind that in theory the fetch can be completely different, but ideally you want the same fetch, just with renamed column headings. Same goes for the buttons and fields that you have added to your forms.

5
Translate standard pages

Ensure you translate all of the standard pages too, including login, register, change password, invite, MFA, Email verification (yes, the email sent for password resets and verifications will also adhere the the users selected language at the time the email is generated)

6
Verify page translations

At the top left of the content you can select your language and verify that you have translations for all your pages.

Light grey pages in brackets have not been translated yet. When naming the pages, you can keep the same name as the english page, or translate the name as well:

Process for applying another language (3)

Process for applying another language (3)
7
Translate messages and labels

Once all your pages is translated, you need to translate all of the messages and labels used everywhere. In the Top Umbraco menu you will find the Translation option, with a long list of pre-defined strings used in the klevr portal.

They are organised into groups related to where they are typically used. You do not need to translate the parent items, but all the leaf items should have translations:

Process for applying another language (4)

Process for applying another language (4)

The Umbraco editor is a bit cumbersome for translating multiple items, so we have created a tool to assist with this task. On the elipsis menu next to portal, select export:

Process for applying another language (5)

Process for applying another language (5)

Include descendants to get all of the items exported.

Next, go to the Klevr CE teams channel, to files, open the Klevr Portal folder (the green one) and download the Translate folder:

Process for applying another language (6)

Process for applying another language (6)

Extract the contents, and open the translate.html page

Select the .udt file you just downloaded from Umbraco.

You will now see a list of all the translations. If you don't see your target language, do at least 1 translation in Umbraco, and export the udt file again.

Process for applying another language (7)

Process for applying another language (7)

You can now quickly and easily translate all of the messages. Please heed the following:

  • Some messages contain placeholders wrapped in curly braces. The placeholders must be copied verbatim to the right location in the target message, e.g.

Process for applying another language (8)

Process for applying another language (8)
  • Preserve spaces before and after messages, if any.

Once you have it translated, save and then download the udt file containg the translations. You can now go to Umbraco and upload the translated udt file by using the menu next to the top "Dictionary" item on the translation page.

8
Translate klevr forms

If you need to translate klevr forms as well, make a note of the ISO language code for your added language. The code can be seen under settings -> languages, e.g. en-US or af-ZA. This code needs to be added to an environment variable defined in the portal solution. Once this is added, the Klevr Form Editor in CE will show the new language and show an area where all form strings can be translated.

9
Add bindings for the language

One last thing to do is to add bindings for the languages on your portal. A binding can either be a new domain name or a path added to the existing domain, e.g. en.myportal.com or myportal.com/en. The latter is easier as it does not require more domain registrations, certificates, redirects and various aother Azure configuration to be done. To add a binding, navigate to the content section in Umbraco. Click the elipsis menu next to the Home page, and select do something else, then select culture and hostnames. Add suffix for each langage and bind it to the language, e.g.:

Process for applying another language (9)

Process for applying another language (9)
10
Verify the translated portal

Your portal is now translated. When you browse to it, you will notice a new globe icon next to the login / username button. This will allow you to select a different language to see the portal in. Notice the URL will change to the binding you added for that language.

Process for applying another language (10)

Process for applying another language (10)

🚫 Out of Scope

  1. Providing actual translations for other languages.
  2. Translating payment gateways (stripe or payfurl). These will default to the english version.

Last updated on