Hi,
I try to change text of "Grand Total" with Localization Manager, set the localization for "Pivot_GrandTotal", but nothing happened. Other text, such as "Pivot_AggregateSum", "Pivot_AggregateCount", and other are translated successfully, but "Pivot_GrandTotal" not.
Could you help me?
Thanks
4 Answers, 1 is accepted
I tested this in the CustomDateTimeGroupDescription SDK example, but the Grand Total string is localized properly. Can you try the attached project on your side and let me know if I am missing something? Also, you can you tell me what culture you are using?
Regards,
Martin Ivanov
Progress Telerik

Hello Martin,
thanks you for your reply.
Because my language is not in supported languages, I use method
string GetStringOverride(string key) inherited from class Telerik.Windows.Controls.LocalizationManager. Most of the texts are translatable, but few (Grand Total, Total and few others) not.
Small example:
public class CustomLocalizationManager : LocalizationManager
{
public override string GetStringOverride(string key)
{
if (key == "Pivot_GrandTotal") // method never receive key "Pivot_GrandTotal", so "Grand Total" string never translate
{
return "MyGrandTotalCaption";
}
if (key == "Pivot_AggregateSum") // this key works, it will translate
{
return "MyAggregateSumCaption";
}
return base.GetStringOverride(key);
}
}
}
Thank you for your tips.
Best regards
Martin
Thank you for the provided information. I was able to reproduce the reported behavior when setting the custom localization manager after the InitializeComponent() call. It seems that at this point the GrandTotal text is already taken by the default localization manager and it is no longer required. This is why the custom manager doesn't work for it. To resolve this please move the manager's setting before the InitializeComponent() and let me know how it goes. For example:
public
MainWindow()
{
Thread.CurrentThread.CurrentCulture =
new
CultureInfo(
"cs"
);
Thread.CurrentThread.CurrentUICulture =
new
CultureInfo(
"cs"
);
LocalizationManager.Manager =
new
CustomLocalizationManager();
InitializeComponent();
}
Regards,
Martin Ivanov
Progress Telerik

Hi Martin,
Thank you very much for your solution, it works great :-)
Best regards
Martin