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

Problem in multi language report

3 Answers 363 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shiwani
Top achievements
Rank 1
Shiwani asked on 05 Apr 2017, 01:29 PM

Hello,

I have created a report in Telerik report designer R3 2016, and to make my report multilingual i have created a parameter named pCulture to which user is passing culture name(eg. French(fr-FR), portuguese (pt-PT), English(en-EN)) which is working fine.

How my function is working :

TelerikReportResources.MultilanguageTelerikReport.GetCultureSpecificString(Parameters.pCulture.Value,"Key") //It is User defined function

The "key" will be translated from .net side in any language which has been entered by user in pCulture parameter.

Now the problem is :

I have Pie chart in my report which is showing weekdays, so here i have to compare pCulture parameter first, either it is french, Portuguese or English and again in particular language have to compare for the weekdays.as given below:

 

if the Parameters.pCulture.Value="fr-FR" and dayNameOfweek="Monday" then Monday="Lundi"

if the Parameters.pCulture.Value="fr-FR" and dayNameOfweek="Tuesday" then Monday="Mardi"

elseif the Parameters.pCulture.Value="fr-FR" and dayNameOfweek="Wednesday" then Monday="Mercredi"

elseif the Parameters.pCulture.Value="fr-FR" and dayNameOfweek="Thursday" then Monday="Jeudi"

elseif the Parameters.pCulture.Value="fr-FR" and dayNameOfweek="Friday" then Monday="Vendredi"

elseif the Parameters.pCulture.Value="fr-FR" and dayNameOfweek="Saturday" then Monday="samedi"

elseif the Parameters.pCulture.Value="fr-FR" and dayNameOfweek="Sunday" then Monday="dimanche"

 

same for Portuguese and English.so according to my logic i will have to create 21 elseif for this.

please guide me.

 

 

Vendredi
Vendredi
Vendredi
Vendredi
Vendredi
Vendredi
Vendredi
Vendredi
Vendredi
Vendredi
Vendredi
dimanche
dimanche
dimanche
dimanche
dimanche

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 10 Apr 2017, 09:46 AM
Hello Shiwani,

You can use a custom function, that can be loaded in the Standalone Report Designer from an external assembly(DLL) - Extending Report Designer and in the VS Report Designer the function will be recognized if it is in the same namespace.

You can also use the standard report Localization and globalization mechanisms, which require you to set the application's current thread's culture in order to get labels in the designer language - Localizing Reports. Note that the approach is not based on report parameter, but on the current thread's culture.


Let us know if you need further help.

Regards,
Stef
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Shiwani
Top achievements
Rank 1
answered on 11 Apr 2017, 07:06 AM
Yes I used custom function from external assembly(DLL), my report's translation is working fine, but i have legends in pie chart which is showing weekDays column from my table and i'm not able to use custom function here, so how can i translate that in multi language .please find attached screenshot of legend from pie chart,  heading is reflecting in french as i have used custom function, but i want to show legend also in french.
0
Stef
Telerik team
answered on 13 Apr 2017, 04:32 PM
Hello Shiwani,

The legend text is determined by the Graph.Series.LegendItem.Value which can be set via expression. You can use the custom function in that expression to localize the text.

Regards,
Stef
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Shiwani
Top achievements
Rank 1
Answers by
Stef
Telerik team
Shiwani
Top achievements
Rank 1
Share this question
or