I’m using i18n to make my map bilingual. The docs say that I can change the locale using app.setLocale(“xx-xx”) but the linting says setLocale not available in app and at the same time shows setLocale when i hover over the “app” in code app.setLocale. So is it available or not and if so…why isn’t it showing as available in my code. BTW the code is a JS action step in the application (not in automation nor backend script)
Hi @zangfuqi,
Thanks for reaching out!
I just tested it on my workspace, and i18n works. I was able to configure it using our documentation.
The behavior you encountered seems like a code editor bug. I’ll let the dev team know about it. For now, you can disregard the syntax highlighting and warnings.
i18n works perfectly fine for me…the issue is that i can’t seem to change the app locale programatically using app.setLocale
Hmmm… Could you share more details please? Screen recording or export of your app.

Hi @zangfuqi,
I didn’t even know those also are available on the app object, but you could try with the actual {{ i18n.setLocale() }}.
Sorry spherebread…I stopped getting notifications of responses to this forum post. here is a vimeo video of what i mean. In the ui bakery documentation it says i can use app.setLocale(); to change the locale programatically (in my case so that the date pickers and date column types in the table component show the right language and format for dates. I made a vimeo video of what exactly I mean, but I can’t post it in this forum so not sure how to provide that.