Can you customize the component's 'texts with no keys' translation?

1 Answer 103 Views
DatePicker Localization
n/a
Top achievements
Rank 1
n/a asked on 15 Sep 2022, 10:01 AM

Hi,

In our application we use translation by providing LOCALE_ID value in app.module. Everything works well. It's just that we found some component elements' translation incorrect for our usecase. I mean specifically month names in kendo-datepicker, which are in incorrect grammatical form for polish version. I have not found keys for the mentioned. Is there a way to customize the translation of element's texts besides those seen in the custom messages component? I'll be grateful for the detailed approach.

Kind regards

1 Answer, 1 is accepted

Sort by
0
Martin Bechev
Telerik team
answered on 20 Sep 2022, 08:07 AM

Hi Jakub,

In general, changing the locale of the application displays all dates, numbers, and currencies in the specific format for the chosen locale. That is the process of internationalization. The day, month, hour, and minute names are also a part of the internationalization process and thus are automatically translated when changing the locale.

The second part of the globalization process is the translation of built-in component messages. These are messages such as the "Today" button message used by the DatePicker component. These are messages that aren't affected by the internationalization changes of the components and thus should be translated as necessary by the developer. For that purpose kendo-datepicker-messages component can be used:

https://www.telerik.com/kendo-angular-ui/components/dateinputs/api/DatePickerCustomMessagesComponent/

In these lines of words, changing the month names would require modifying the predefined locale values. More details on that topic can be found here:

https://www.telerik.com/kendo-angular-ui/components/globalization/internationalization/loading-data/#toc-modifying-the-locale-data

This approach allows you to change the default Polish month names as desired. To be more precise please check the following example which modifies the months' names (the capital letter was added). Check the app.module file:

https://stackblitz.com/edit/angular-jpn4wv

I hope this helps.

Regards,
Martin
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
DatePicker Localization
Asked by
n/a
Top achievements
Rank 1
Answers by
Martin Bechev
Telerik team
Share this question
or