This is a migrated thread and some comments may be shown as answers.

Loading locales at runtime

1 Answer 84 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ICT
Top achievements
Rank 1
Iron
ICT asked on 24 Sep 2020, 03:19 PM

Hello,

I need to release my application with a limited set of preloaded loales (EN, DE, ES, FR, IT).

But i need to be able to add any locales at runitme, after the application release.

Maybe i did not understand well, but in this documentation:

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

seems that i need to know the locales i need BEFORE the deploy. am i wrong?

How can i do? Any suggestions?

Thanks,

Benedetta

1 Answer, 1 is accepted

Sort by
0
Svet
Telerik team
answered on 28 Sep 2020, 10:34 AM

Hi Benedetta,

Thank you for the provided details.

Indeed, there isn't a Kendo UI for Angular specific feature or functionality that would allow to load the locales at run time. I am not sure what is your exact setup, but if the desired locale is a part of a lazy loaded module then it will be used only when navigating to the corresponding route.

If the requirement is to select a specific locale and only then to load it, then some custom implementation could be used. For the purpose you can check the following article for some more details on this topic:

https://medium.com/lacolaco-blog/angular-dynamic-importing-large-libraries-8ec079603d0

However, that is a framework specific implementation that is a subject to change in order to suite the specific use - case scenario. I hope it helps. Please let me know in case any further information is required for this case. Thank you.

Regards,
Svetlin
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Tags
General Discussions
Asked by
ICT
Top achievements
Rank 1
Iron
Answers by
Svet
Telerik team
Share this question
or