coffee demo

1 Answer 118 Views
Localization
Ursus
Top achievements
Rank 1
Iron
Ursus asked on 23 May 2022, 08:14 AM

Hi

just a quick question - I need to make a multi-language application and am basing it off the coffee demo application. What I have is working perfectly but I am missing the German translations for the component messages? If I look in the /messages folder there are files for en, fr and en... I know how to implement the function and have it working for MY components, I just don't really want to have to do the German translations for the Kendo elements myself. Is there somewhere I can download the from?

thank you

ursus

1 Answer, 1 is accepted

Sort by
0
Yanmario
Telerik team
answered on 26 May 2022, 05:27 AM

Hi Ursus,

The custom messages from the Coffee-Warehouse examples are from the following repository where they can be downloaded or copied:

https://github.com/telerik/kendo-angular-messages/tree/develop/messages

Worth mentioning is that some messages might be missing translation as we provide only the English and Bulgarian translations. The rest of the languages are a community effort to help us translate the messages of our components into different languages. Feel free to open a pull request if you decided to translate some of the messages into a different language.

I hope this helps.

Regards,
Yanmario
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/.

Ursus
Top achievements
Rank 1
Iron
commented on 26 May 2022, 05:09 PM

ok, thank you. I will copy all the texts into the de file I am using so that it works with the coffee example :)
Vedad
Top achievements
Rank 2
Bronze
Bronze
Veteran
commented on 11 Nov 2022, 02:32 PM

Hi  all,  

Is there any simple way that now we can use XLF to translate app in real time.  

I don't need any new keys, simply want the  dropdown with 2 languages and when I change, it switches to the another language (xlf file) and translates my widgets.

All examples I could find require either overriding of message services and having json object with keys.

It makes no sense that I have to copy all keys from the XLF files, override service and have them identical in other files when I don't need an override.

Is there any way to do this?

Thank you!

Vedad

Yanmario
Telerik team
commented on 16 Nov 2022, 09:28 AM

Hi Vedad,

Generally, the Angular i18n module doesn't allow translating the application runtime. The module requires multiple applications for the different languages, and the applications can be navigatable using Angular routes.

https://angular.io/guide/i18n#generate-app-versions-for-each-locale

https://angular.io/guide/i18n#configuring-servers

Because of this limitation(not allowing translation runtime), Kendo UI for Angular provides the MessageService to translate our components. List of supported components:

https://www.telerik.com/kendo-angular-ui/components/globalization/globalization-support/

https://www.telerik.com/kendo-angular-ui/components/globalization/localization/messages/#toc-using-the-message-service

https://www.telerik.com/kendo-angular-ui/components/globalization/localization/messages/#toc-updating-messages-dynamically

A 3rd party approach could be taken like ngx-translate or other similar libraries, but such an approach is outside of our support scope. The developer would need to do their own research on that matter and implement a solution that is fitted for their application.

I hope this helps.

Regards,
Yanmario
Progress Telerik     

 

Vedad
Top achievements
Rank 2
Bronze
Bronze
Veteran
commented on 16 Nov 2022, 10:40 AM

Hi Yanmario,

thank you very much for your reply.

MessageService is obvious choice, but my only question is can we avoid converting XLF files (that already exist for the components) to json objects and then importing them for messageService. Problem is, beside duplication, that with each update  of kendoUI version we have to "reconvert" files for languages we support and check everything. 

Is there any way that you provide json equivalent of XLF files for such uses. Or if you can recommend safest approach to this, it would be very helpful.

Thank you

Regards
Vedad

Yanmario
Telerik team
commented on 21 Nov 2022, 08:02 AM

Hi Vedad,

I am afraid that there isn't much else that can be done as the built-in approaches are demonstrated in the following documentation:

https://www.telerik.com/kendo-angular-ui/components/globalization/localization/messages/

In theory, the developer can create a JSON file with the needed translation and use it for dynamic translation:

https://www.telerik.com/kendo-angular-ui/components/globalization/localization/messages/#toc-updating-messages-dynamically

But there isn't a specific approach that I can recommend for such a custom implementation.

Regards,
Yanmario
Progress Telerik     

Tags
Localization
Asked by
Ursus
Top achievements
Rank 1
Iron
Answers by
Yanmario
Telerik team
Share this question
or