is there a way to set all labels of scheduler component by code? I need a scheduler where the whole text should be changeable independent from current culture (buttons, date and time strings,...)
2 Answers, 1 is accepted
answered on 27 Nov 2020, 09:11 AM
In the current implementation the only way to change strings is through the ITelerikStringLocalizer interface. This affects all telerik components. So you can define a custom service that implements this interface, and returns strings on some other factor, rather than culture. However this will affect all telerik components, not just the scheduler.
publicclassSampleResxLocalizer : ITelerikStringLocalizer
// this is the indexer you must implementpublicstringthis[string name]
// sample implementation - uses .resx files in the ~/Resources folder named TelerikMessages.<culture-locale>.resx// You can get the values from anywhere you need howeverpublicstringGetStringFromResource(string key)
return Resources.TelerikMessages.ResourceManager.GetString(key, Resources.TelerikMessages.Culture); ;
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/.