This is a migrated thread and some comments may be shown as answers.

Dynamic text in Value of resx file

4 Answers 449 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Siddhi
Top achievements
Rank 1
Siddhi asked on 27 Aug 2020, 12:01 PM

Hi All,

I'm creating a telerik report for an application supporting multiple languages.

One of the labels needs to display value based on some condition - the entry is present in default resx file like below - where text1 & text2 are in english

Key => label.Value

Value => =iif(Fields.someProperty= 1, "text1", "text2")

What is the best way to do this in remaining languages? If this condition changes in future, I don't want to change it in other language files.

Thanks in advance.

4 Answers, 1 is accepted

Sort by
0
Siddhi
Top achievements
Rank 1
answered on 01 Sep 2020, 06:37 AM
Can some one look into this please. 
0
Neli
Telerik team
answered on 01 Sep 2020, 11:25 AM

Hello Siddhi,

Basically, you can localize the report in multiple languages. Firstly, you need to set the Localizable property to True. Then select a value from the Language property. Once you select the language, set the textbox value. For example:

= Parameters.Parameter1.Value ? "FRTrueValue" : "FRFalseValue"

Then you can select another Language, and again you need to add the localized value. If you want to change the value later, select the Language and make the required change.

Please, check the attached report for further reference.

Regards,
Neli
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

0
Siddhi
Top achievements
Rank 1
answered on 01 Sep 2020, 11:53 AM

Thanks for your reply.

Now consider if I want to support 20 language for my application. If in future condition changes from

= Parameters.Parameter1.Value ? "FRTrueValue" : "FRFalseValue"

to

 

= Parameters.Parameter2.Value ? "FRTrueValue" : "FRFalseValue"

then will I have to change the condition 20 times for each language?

 

Regards,

Siddhi

 

0
Neli
Telerik team
answered on 04 Sep 2020, 08:25 AM

Hi Siddhi,

Thank you for your clarification. In such a case, I am afraid that you will need to reset the values manually.

Regards,
Neli
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Siddhi
Top achievements
Rank 1
Answers by
Siddhi
Top achievements
Rank 1
Neli
Telerik team
Share this question
or