Is there any way to get the list of available locales in kendo?

1 Answer 167 Views
Localization
Deepali
Top achievements
Rank 1
Deepali asked on 09 Dec 2021, 07:04 PM
Hi team

 

I need to get the list of all locale names available in kendo-angular-intl package programmatically. Is there any api or function exposed by kendo which gives us the same list.

https://unpkg.com/browse/@progress/kendo-angular-intl@1.7.1/locales/

I just need the name of the locales present in the above link.

This is required because i want to load the locale data on demand provided by unpkg api kendo. And that needs locale id as input parameter. Now the unpkg api exposed by kendo, takes sometimes bg-BG only first half and in some cases take full like en-CA locale id. 

I need to write some logic on which basis i can check whether to split locale by '-' or not so that unpkg api gives me correct result.

Please help.

 

 

 

1 Answer, 1 is accepted

Sort by
0
Martin Bechev
Telerik team
answered on 14 Dec 2021, 08:44 AM

Hi Deepali,

The @progress/kendo-angular-intl package doesn't have a built-in mechanism for fetching all available locales. In general, this package provides pre-built locales which are generated from the cldr-data package and simplify the loading of the requested data. 

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

The following thread might be found useful as well:

https://github.com/rxaviers/cldrjs/issues/30

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Localization
Asked by
Deepali
Top achievements
Rank 1
Answers by
Martin Bechev
Telerik team
Share this question
or