[Multilingual Component] Locale value lost on new tabs for reactive Web

Forge Component
(15)
Published on 2019-10-04 by OutSystems R&D
15 votes
Published on 2019-10-04 by OutSystems R&D

I have a Reactive web application, and I load the translations from resource and set the locale based on user preference 'OnApplicationReady'. Everything works fine until I open the same application on a tab or do a Refresh (F5) of the page with a user already logged in, the page is rendered with the default locale and only when I navigate to a screen is the correct one used again. 


Why is the getLocale value empty in these situations? I tried to add an onInitialize on every screen to check if the locale is set and force it if it is not, but it is not 100% effective when opening a new tab.


Has anyone encountered the same behaviour? Any Idea why this happens?

Hi Paulo,

Good Day!!

I have an Idea!

  1. Create a client variable.
  2. Assign the locale whenever the locale changes.
  3. Then for example, Check if the locale in client variable is EN then do the stuffs.

Hope It helps.

Thanks and Regards,

Aravind M, Outsystems Developer.

I think I have the same problem. The translation works fine. If I press F5 a few times, the translation is gone. If I save the locale in a client variable it doesn't work either. @Paulo Bastos Do you already have a solution for this problem?