I was recently asked to add a multi-language feature to a Qlik Cloud app, and I’d like to share how I accomplished it:
Step 1: Create a Translation Excel File
First, I created an Excel file to manage all the words that appear in the app and their translations for the desired languages. In my case, I included English (EN) and Spanish (ES).
The Excel file contains the following columns:
Translation ID: A unique identifier created by concatenating various IDs. For example:
Id_0: Uses D for Dimensions, M for Metrics, and L for Labels.
Additional IDs: Custom names for clarity.
Table_Dimension: An informational column indicating the table where the field originates.
Language Columns: Each column represents a language, containing the text to display in the app for that language.
Load Flag: A final column to mark whether a row should be loaded into the app.
Step 2: Add the Script
Next, I added the following script to the app:
Step 3: Create Variables
I created two variables to manage language selection:
vG.Value.Language: Stores the default language (e.g., EN).
vG.Value.Multi.Language: Retrieves the corresponding translation based on the selected language: