Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
Alberto_Vaghi
Employee
Employee

Delivering a multilingual Qlik Sense app shouldn’t mean forcing users to pick their preferred language every time. In this post, I explore how to streamline the experience by automatically detecting a user’s locale from their Qlik Cloud profile and instantly adapting the app’s interface - no dropdowns, no extra clicks.

Building on the well-known community approach shared by Jennel, this method keeps the flexibility of translation tables while removing friction for end users. The result? A truly seamless multilingual experience that feels natural and effortless.

Introduction

In our increasingly globalized environment, enabling seamless multilingual support in your Qlik Sense apps is no longer a nice-to-have - it’s expected.

Many implementations require users to manually select their desired language to display labels and content. In a helpful Qlik Community post, Jennel guides users through building a multilingual Qlik Sense app using an Excel-based translation table and manual language selection via dropdowns.

While Jennel’s solution is powerful and flexible, it relies on users making that initial language choice. In this article, I’ll show how to streamline the user experience by automatically detecting a user’s preferred language - based on their Qlik Cloud profile - and dynamically adapting the app accordingly using the GetUserAttr('userLocale') function.

 

How Jennel’s Approach Works

Jennel’s method involves:

  • Preparing an external source (e.g., an Excel file) that stores translations for labels and interface elements.
  • Loading this translation table into the app.
  • Letting users manually switch languages using a selection control such as a filter pane.
  • Using conditional expressions in the UI to swap labels and dimensional headings based on the selected language.

This approach, while widely used, introduces a required step - it depends on users selecting their preferred language every time they open the app.

 

Enhancing the Experience with Automatic Locale Detection

My solution builds on Jennel’s foundation with one key improvement: the app automatically reads the user’s preferred language from their Qlik Cloud settings via the newly added attribute to the GetUserAttr: userLocale. This eliminates manual language selection and delivers an interface that adapts instantly and seamlessly to each user.

 

Technical Breakdown

In the Data Load script, nothing really changes from Jennel’s approach: I loaded an external file containing the required translations:

Picture1.png

The magic happens in the front-end part of the analytics app. Everything that should be translated uses the same approach that Jennel stated in her article: a variable with a Set Analysis filter containing the ID of that specific label/title/subtitle.

={<Index={46}>} $(vLanguageString)

The magic is in the variable; $(vLanguageString), in fact, is defined as:

Alberto_Vaghi_1-1757015347543.png

vLanguageString = Only({<Language={"$(vUserLanguage)"}>} Translation)

Please note the use of another variable called “vUserLanguage”: the usage of a nested variable allows to manage situations in which the user locale is not included in the translations table. Let’s say a user has Qlik Cloud set in Spanish but Spanish translations are not available: in this case the app would display everything in English despite the user locale selection.

The variable “vUserLanguage” is defined as follows:

Alberto_Vaghi_2-1757015357723.png

vUserLanguage = if(count({<Lang={"$(=GetUserAttr('userLocale'))"}>} Lang) = 0, 'en', GetUserAttr('userLocale'))

As you can see, I used GetUserAttr(‘userLocale’) to fetch the preferred language set by the user in their Qlik Cloud profile. Doing this, automatically sets the translation to the user’s preference without any manual intervention.

The field “Lang” is in a dedicated table I created in the Load Script that contains all the languages available in the translations table:

Alberto_Vaghi_4-1757015380726.png

To give users feedback regarding the current language, I used a flag image conditionally displayed in the app by leveraging a Layout Container. Layout Container, in fact, can conditionally display elements inside them: I then defined the conditional display rule as follows.

=$(vUserLanguage) = 'de' for German Flag

=$(vUserLanguage) = 'en' for English Flag

=$(vUserLanguage) = 'it' for Italian flag

An alternative solution could be to use a KPI with a conditional background image, using the string returned by GetUserAttr as part of the image name. Note that I used the “vUserLanguage” variable to ensure that we catch the default in case user locale is not available in the translations table.

 

The result

Accessing the app with locale set to “English” displays all labels and titles in English:

Alberto_Vaghi_5-1757015453786.png

Let’s go to my Qlik Cloud profile and changing locale to “Italian”:

Alberto_Vaghi_6-1757015464198.png

Re-accessing the app displays labels and titles in Italian (check the flag on top right!):

Alberto_Vaghi_7-1757015522396.png

Easy, without any additional effort!

Hope this article inspires you to build multilingual apps with this new feature!

2 Comments