Loading locales at runtime

2 posts, 0 answers
  1. Benedetta
    Benedetta  avatar
    13 posts
    Member since:
    Sep 2016

    Posted 24 Sep Link to this post

    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

  2. Svetlin
    Admin
    Svetlin avatar
    444 posts

    Posted 28 Sep Link to this post

    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).

Back to Top