94
Views
3
Comments
Solved
Set translation using client variable when screen loads entity data
Application Type
Reactive

Hi All,

I'm trying to translate a text in table which is showed as a dropdown in table on screen.

I set locale using Client Variable when screen loads. Unfortunately, I'm not able to set locale to this dropdown as Client variable seems out of scope.

The same locale works for text coming from another entity (not in form of dropdown) in another screen.


Thanks,

Aman Devrath

2023-08-28 07-00-10
Paulo Torres
Champion
Solution

If the values comes from static table you can use multilingual from OS.

Another option: If you only support two languages you can create a field from French language in your static table and show one or another one depending on language.

What you are trying to do needs to be change if you want to go like that: Local variable in your screen, set a value from ClientVariable OnInitialize for example and after use local variable instead.

Regards

2024-04-15 16-08-47
Aman Devrath
Solution

Answer by Paulo is a good approach if you need to show translation from entity/static entity.

But I had to follow a different approach. So I used this in the Options Text parameter for the dropdown: 
If(GetCurrentLocale() = "en",RiskLevel.LangEng, RiskLevel.LangFr) 

2023-08-28 07-00-10
Paulo Torres
Champion

It's the easy one :) Glad to help you

2023-08-28 07-00-10
Paulo Torres
Champion
Solution

If the values comes from static table you can use multilingual from OS.

Another option: If you only support two languages you can create a field from French language in your static table and show one or another one depending on language.

What you are trying to do needs to be change if you want to go like that: Local variable in your screen, set a value from ClientVariable OnInitialize for example and after use local variable instead.

Regards

2024-04-15 16-08-47
Aman Devrath
Solution

Answer by Paulo is a good approach if you need to show translation from entity/static entity.

But I had to follow a different approach. So I used this in the Options Text parameter for the dropdown: 
If(GetCurrentLocale() = "en",RiskLevel.LangEng, RiskLevel.LangFr) 

2023-08-28 07-00-10
Paulo Torres
Champion

It's the easy one :) Glad to help you

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.