Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everybody,
I am looking for a way to preselect a language depending on the user. In my data model is a table with every user and their preferred language (Field UserLanguage). There is also a field Language in another table that displays all available languages and controls the language in the app. (There are users who want to switch between languages). For this field Language the option “always one selected value” is checked.
When a user enters my app, I want the app to pre-select their Userlanguage in the field Language.
For that I have created a variable. The output is the Userlanguage of the active user.
If nothing is selected in the Language field I can search with this expression and get the correct language:
=Language =vLanguageUser
I would then save this in a bookmark.
However, this only works if nothing is selected. But after I checked the option “always one selected value”, there is always something selected and so it doesn't find the language anymore.
Does anyone know a workaround or an alternative solution?
Thank you!
the way we implemented language is via URL. so the user clicks on the URL with the desired language. then if the user wants to switch language, the user clicks a button that has a URL with the desired language. we decided that you dont want to switch language just inside the dashboard as it will be weird to have all the menus and system labels in one language and then your field names, selections, filters, values in a different language.
of course there is only one dashboard and the dashboard has all the internal words (labels, field names, values) translated. and we make sure the language in the URL is the same language selected.
in the dashboard itself we created a hidden language field which we lock.
this is how we format our URLs:
https://<SERVER>sense/app/.../sheet/.../state/analysis/language/en/bookmark/<bookmarkID>
where the bookmark includes the language field selected and locked
Hello Edwin,
Thank you very much for your answer. You have given me exactly the right idea. At least for some of the users. Our sales reps already use a URL to jump from their customer relation management tool with their selections to our Qlik Sense app. We could just add the language here.
Unfortunately, the rest of the users do not use an URL .
As a workaround, I have generated a button in which the language for the user is stored. Actions work, but bookmarks do not with “always one selected”. As far as I know, it is not yet possible to store actions when opening the app.
The button works, but I wanted a more elegant solution, since the users are annoyed that the default setting is english.
Unfortunately, we also need the possibility to change the language within the app. Because we have countries that speak several languages and depending on the customer, it must also be possible to change the language.
if you change the language via button then you can build the URL into that button - you can change the lanuage of your field values and you can set the QLik Sense language - all via URL
one other way that ive only tested but never implemented (as we use URLs to open our dashboards) is to create an extension that looks up the locale of the user and sets the language in your dashboard. so if the user opens the dashboard, the locale and the values inside the dashboard will have the same language. then if the user wants to switch to a different language use a button to triger a URL that has the QLik sense and data displaying the same language based on what the user wants
an action at the sheet level to set the variable wouldn't work?
Hi MaryseC, thank you for your answer.
I have thought about it too, but the problem is that we have sales representatives who are responsible for countries that speak several languages.
That means you have to have the possibility to change the language depending on the customer. With the variable on sheet level, the language would then change back when you are back on the sheet and that would not be ideal.
Ideally, the user's default language should only be set once when the app is started and then it is possible to change the language for the customer.