How do I set default ui language other than english (e.g. Hebrew)?

256
3
02-26-2024 08:16 AM
MichaelLev
Occasional Contributor III

by ?locale=he I can set the language, but I want that the default ui language will be Hebrew, and that if the user want English, he will have to set ?locale=en

How do I set that the default ui language will be Hebrew?

0 Kudos
3 Replies
Noah-Sager
Esri Regular Contributor
0 Kudos
MichaelLev
Occasional Contributor III

Hi @Noah-Sager , I looked at your 2 links but I have not seen a way to set locale to Hebrew without adding "?locale=he" to the url. Have I missed something?

0 Kudos
MichaelLev
Occasional Contributor III

If I understand correctly - "?locale=he" from url is copied into AppContext.locale interface when the app is loaded and not changed afterwards. If url does not contain "?locale=" then AppContext.locale is not defined, and when EXB opens, it will set the locale to a fixed default value of "en".

What I still do not know is how to cause AppContext.locale to be "he", even without adding "?locale=he" to the url.
In orther words - does React enables it, to "force" AppContext.locale to be "he" as if the user had entered "?locale=he"

 

0 Kudos