23
Views
5
Comments
Solved
multilingual is not working
Application Type
Reactive

i have a reactive web app that needs to be multilingual,

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 when I change the locale at the runtime the text is not translated, although the left to right is applied and changed to the desired orientation.

the text is localized only with the default(which is set in OnApplicationReady to arabic) locale but when I change the locale at runtime using setLocale and I give it an empty string to localize the text to the default language (which is english) nothing is translated, only left to right is applied correctly 

Rank: #989
Solution

I figured it out, I was doing nothing wrong in using multilingual application, 

all I have to do after changing locale in runtime is to refresh the current screen so the new locale takes effect

Rank: #2442

Hello Muhamed,

Is it possible to post the oml so I can take a better look at it? If not can you atleast take a screenshot of the actions you use with the parameters?

Rank: #686

Hi Muhamed,

You are setting locale and giving blank text on that particular key, that why its showing blank, on ready its chaning to arabic but at runtime once you change locale it will check the resource file locale and particular key -value for that element.

Please find the below link for better and details understanding about the multilingual. Hope it will help you.

https://www.outsystems.com/forge/component-overview/1784/multilingual-component

https://www.outsystems.com/forums/discussion/21245/multilingual-mobile-component-documentation


Regards,

Dileep Verma

Rank: #989

Hi Dileep,

I guess that when i give it a blank text that the default language(the language with tha app is implemented) will be used, Am I getting it wrong ?

although when i set the locale to en and add that locale in the resources the text is not translated.

All i want to do is to switch between two languages : The default language (which the app is implemented in) english and arabic, when i set the locale in OnApplicationStart to arabic the text is translated and everything is ok, once i change the locale at runtime to use english locale, the left to right is applied only to the block where the set locale action is called and the text is not translated


Rank: #989
Solution

I figured it out, I was doing nothing wrong in using multilingual application, 

all I have to do after changing locale in runtime is to refresh the current screen so the new locale takes effect

Staff
Rank: #102

Hello Muhamed,

I noticed that you are using the Forge Multilingual Component for Reactive Applications, so I would like to share with you that with the Platform Server 11.10  you can now translate the UI of your Reactive Web Apps and Mobile Apps directly inside Service Studio. Multilingual is a technical preview feature and you need to activate the option "Multilingual for Mobile and Reactive" in LifeTime. After enabling the feature, you can use the new Multilingual Locales folder and new SetCurrentLocale system client action. To achieve your use case you can keep calling the new SetCurrentLocale on the event OnAppicationReady to set the default locale for your application.

To help you reuse translations from the forge component while migrating to the new feature you can take a look at this article.

Let me know if you have any questions and in case you start using the new feature please keep sharing feedback :) 

Thank you!