How does the Mendix UI determine the language from multiple language packs in terms of priority?

0
Hi, All Do you happen to know how the Mendix UI determines the language from multiple language packs in terms of priority?   What I know about the factors that impact the UI are as follows. - The App's default language setting - User's default language configuration - Explicitly selected language from the language selector - Client browser's language selection   I expect the app's default language to be selected for anonymous users. After logging in, the user's default language will be applied. And I found here that the client browser's default language selection also impacts the language selection. If you log out and make a change to the browser's language selection priority. Close the browser and reopen the app. It will show you the language according to the browser's language selection rather than the app's default language. That makes it hard to understand the priority of selecting the app's language.   I appreciate any response from you.            
asked
3 answers
1

Ah, you are right: the browser's language (or OS language) does affect the language for anonymous users!

https://docs.mendix.com/refguide/translatable-texts/#4-setting-the-end-users-language

So, having anonymous users enabled, the browsers default will prevail. After you login, the users' assigned language is probably only used after a refresh (F5). This is explained in the documentation I'm referring to.

Per browser, you can configure a preferred language list.  You can see the configuration on whatismybrowser.com for example. In Chrome you can configure this on chrome://settings/languages

answered
0

Hi,

With Mendix UI, you mean the front-end of a developed application? The the session has a determined language, based on the the language of the user (System.User_Language). If the user is anonymous, this assocation is unset or set to a non-configured value, the language defined as default in Studio Pro is then used. So in the example below, the user will always get the English UK language.

There are widgets that can detect the language of the browser, but I think the session needs to be reset to make that work. Do you need more info on that matter?

 

image.png

 

answered
0

Thank you, Johan.

Here is the strange symptom I didn't expect.

 

I set my application's default language as English and didn't add any extension or setting related to the browser's default language.

image.png

 

The browser (Firefox) on the left-hand side sets its default language as English, showing my app in English for an anonymous user.

The browser (Chrome) on the right-hand side sets its default language as Korean, showing my app in Korean for an anonymous user.

스크린샷 2023-12-18 194559.png

 

I changed the browser's default language on the left-hand side to Korean and restarted the browser, showing my app in Korean for an anonymous user.

I changed the browser's default language on the right-hand side to English and restarted the browser, showing my app in English for an anonymous user.

스크린샷 2023-12-18 194816.png

 

It looks like the browser's default language setting has higher priority than the app's default language.

However, the Mendix document doesn't explain it clearly.

https://docs.mendix.com/refguide9/language-settings/ 

image.png

 

I appreciate any comment from you.

 

 

answered