Hello,
I'm using Telerik.UI.for.Blazor version 7.1.0 and I'm trying to automatically translate the telerik components (specifically, a TelerikTreeList but there wil be more) following the tutorial on https://www.telerik.com/blazor-ui/documentation/globalization/localization but they are not being translated.
- I have copied the TelerikMessages files (both the resx and the es-ES.resx) from C:\Program Files (x86)\Telerik\Telerik UI for Blazor 6.2.0\messages into my Properties folder and set them as EmbeddedResource.
- I have implemented an ITelerikStringLocalizer class as follows:
public class TelerikLocalizer : ITelerikStringLocalizer
{
public string this[string key] => TelerikMessages.ResourceManager.GetString(key, TelerikMessages.Culture) ?? key;
}- I have registered it using the following code:
services.AddSingleton<ITelerikStringLocalizer, TelerikLocalizer>();
services.AddLocalization(options => options.ResourcesPath = "Properties");
services.AddTelerikBlazor();Finally, in my App.razor.cs class, I have set the default culture to spanish as follows:
var newCulture = new CultureInfo("es-ES")
{
DateTimeFormat =
{
ShortDatePattern = DateTimeFormatter.ShortDateFormat,
ShortTimePattern = DateTimeFormatter.HourFormat
}
};
CultureInfo.DefaultThreadCurrentCulture = newCulture;
CultureInfo.DefaultThreadCurrentUICulture = newCulture;
Thread.CurrentThread.CurrentCulture = newCulture;
Thread.CurrentThread.CurrentUICulture = newCulture;However, when I go to the TelerikTreeList, the tooltip of pages and the number of items are still in english, as you can see in the attached image. What am I doing wrong?
Thank you for your support.
Román
