Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
Jennell_McIntire
Employee
Employee

A colleague of mine had translated two demos from the Demo Site to Japanese and wanted to know if we could post them on the Demo Site alongside the English versions. We decided that it would be best to combine the English and Japanese versions into one multilingual Qlik Sense app making it easier for us to add additional languages to the app as needed. It was an easy process and required only a few steps:

  1. Create a translation sheet with all the languages that will be available in the app
  2. Update the script to add a table of the translations and a list of the languages available in the app
  3. Add a Language filter pane to every sheet in the app that allows only one selected value
  4. Update sheet names, chart titles, subtitles and labels with an expression that will display the text in the selected language

Create Translation Sheet

To begin the process of making a demo multilingual, I created an Excel file with all the languages that are to be included in the app. Below is a snippet of the worksheet. The first column, Index, has a unique value which will be used in the charts and expressions to indicate what data should be displayed. The second and third columns are the languages to be used in the app. An additional column can be added for additional languages that need to be added to the app. In this scenario, I entered all the English text (sheet names, chart titles and subtitles, labels and text) and then using the Japanese version of the app, I entered the respective Japanese text. If I did not have the Japanese version of the app, I would have shared the Excel file with someone who could enter the Japanese translations for me. Preparing the Excel file in this format makes it easy to add additional languages to the app without having to update the QVF.

Snippet of Excel translation sheetSnippet of Excel translation sheet

Update the Script

Once the translation sheet was created, it needed to be loaded into the data model. The script below is what I added to the demo.

script.png

On line 1, the HidePrefix system variable is used to hide all fields that begin with “#.” Starting on line 3, the Excel file is loaded. Once it is loaded, the vLanguage variable is set to the expression “=Minstring(#LANGUAGE).” This is an important step and we will take a closer look at this when we update the front-end. On line 13, the languages from the Excel file are loaded - users can select the language they would like to view from this list. These languages are then stored in the #LANGUAGE field which will be hidden from the user (since it starts with “#”).

Add Language Filter

One each sheet in the app, I added a Language filter pane using the dimension #LANGUAGE that was created in the script. Once the script is reloaded with the HidePrefix variable, the #LANGUAGE field will not be visible, but you can still use it as the dimension in the Language filter pane. I needed to see the field temporarily so I commented out the HidePrefix line in the script and reloaded so I could change a setting on the field. I only want the user to be able to select one Language at a time, so I needed to check the “Always one selected value” checkbox in the Field settings of the #LANGUAGE field. (Right click on the #LANGUAGE field and select Field settings to see the window below).

Field settings dialog windowField settings dialog window

Once my settings are saved, I uncommented the HidePrefix line and reloaded the app to hide the #LANGUAGE field again. The filter pane will look like this (image below) and only one language can be selected at any given time. When a language is selected, the vLanguage variable (that was created in the script) will store the language. This variable is used later when updating the text in the UI.

Language filter paneLanguage filter pane

Update Front-End

Now the last step is to update everything in the app that should be translated. In this scenario, I updated sheet names, chart titles and subtitles, chart labels, KPI text and text on the sheets. Here is an example of how I updated the title of the Language filter pane. In the title field, I entered:

index.png

In the snippet below from the Excel translation sheet, the Index is 64 for the text “Language” which is why I used it in the expression above for the title of the Language filter pane. This expression will return either the English or Japanese translation for Language depending on the value of the variable vLanguage.

Snippet from Excel translation sheetSnippet from Excel translation sheet

Another piece of information I would like to share is how I handled Text & image objects that needed to be translated. In the screenshot below, there is heading text and body text that have 2 different formats (font size and font color).

intro.png

To handle this, I created two variables, one for the heading and one for the body and in the variables, I stored the translation expression.

edit intro.png

variables.png

This way, I was able to not only translate the text but format the text in a single Text & image chart two different ways.

As you can see, it is easy to make a Qlik Sense app multilingual and it is easy to update the app with additional languages as needed. Sales, Customer Experience & Churn and Supply Chain – Inventory & Product Availability are the two demos that were made multilingual. Check them out and switch between the languages to see the final results. If you are interested in doing this in QlikView, check out Chuck Bannon’s blog on this topic as well as making the data multilingual in a QlikView app.

Thanks,

Jennell

24 Comments
Daniel_G
Partner - Creator
Partner - Creator

Hello @Jennell_McIntire,

is it also possible to use the translation sheet in Qlik NPrinting? Is there also a blog entry how to do it?

0 Likes
2,817 Views
riko23
Contributor II
Contributor II

how to translate labels and titles in qlik sense with the help of browser locale

2,515 Views
ppatwardhan
Contributor
Contributor

Any option other than having Language as a Filter?

0 Likes
2,254 Views
JuanGerardo
Partner - Specialist
Partner - Specialist

Hi @ppatwardhan, why do you think a filter is a problem?

JG

0 Likes
2,208 Views
ppatwardhan
Contributor
Contributor

Using Filter is not a problem, but we want it to be seem less.

Once you login to the Dashboard as a user with German Language, it should show the dashboard in German and not have an additional click of selecting a Language and then start the dashboard usage.

it should be based on browser locale.

 

0 Likes
2,154 Views
JuanGerardo
Partner - Specialist
Partner - Specialist

I think if you want this filter automatic you should think about an extension or using a mashup.

Another solution if you have a user table, for example for section access, is to assign a default language for every user and filter when you open the app with a default bookmark or an action.

JG

0 Likes
2,117 Views
Igor_Amorim
Partner - Contributor
Partner - Contributor

We are using the same approach in this article, all information in the app is in Spanish except the filter selected. 

Igor_Amorim_1-1702397001699.png

Is there any option to translate the filter selected in the app?

Thanks

802 Views
Jennell_McIntire
Employee
Employee

@Igor_Amorim Yes, you can add the translation for the labels of the filter panes to the translation file and then use a similar expression as outlined in the post to translate the labels of the filter panes.  

791 Views
Igor_Amorim
Partner - Contributor
Partner - Contributor

Hi Jennel,

The label of the filter is translated well.

Igor_Amorim_0-1702398111878.png

The problem is when I select this field, the filter bar at the top shows in English.

Look at the screenshot below.

Igor_Amorim_1-1702398418811.png

Thanks

 

772 Views
Jennell_McIntire
Employee
Employee

Hi @Igor_Amorim,

Sorry, I misunderstood your question.  If I understand correctly, you would like to translate the field names as well, so in the selection bar they appear in Spanish.  I can think of two ways to handle this:

  1. Rename the fields in the script 
  2. Use mapping to rename the fields in the app

I blogged about using mapping to rename a large number of fields earlier this year.  You can find the blog post here

I hope this helps.

Jennell

724 Views