Use internationalization or localization in vue.

1 Answer 119 Views
Grid Localization
n/a
Top achievements
Rank 1
Iron
n/a asked on 13 Nov 2023, 06:44 AM | edited on 13 Nov 2023, 06:46 AM
Is there any way to localize components in vue? I found that localization does not translate all text。Can you provide a case study or refer to the corresponding documentation?

1 Answer, 1 is accepted

Sort by
0
Accepted
Vessy
Telerik team
answered on 14 Nov 2023, 03:15 PM

Hi, Qiushen,

The Kendo UI for Vue Native Localization package enables you to adapt a component to a different locale by providing options for translating its messages. The package provides a `loadMessage` function that can be used in order to  load messages for specific languages. The following example demonstrates how to customise the localization messages of the Grid:

All messages specific to the Grid can be found here, but you will need to also localize the messages of the nested in the Grid NumericTextBox, DateInput, Calendar and DatePicker components. A full example containing the customized localization of all messages used inside the Grid can be found here:

I hope the provided information will be helpful for you but do let me know in case I can assist you any further on this matter.

Regards,
Vessy
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources

n/a
Top achievements
Rank 1
Iron
commented on 19 Nov 2023, 05:27 PM

Hi, Vessy,

Thank you for your answer. I tried to imitate the code in the case, but there are still some parts that have not been translated. I am very confused about this and hope to get an answer. Thank you! 

https://stackblitz.com/edit/dx53ge-vusaeg?file=src%2Fmain.vue

If there is a problem with the above link, you can check the attachment

Vessy
Telerik team
commented on 21 Nov 2023, 06:43 PM

Hi, Queshen,

Thanks a lot for the provided sample. Indeed there seems to be some localization strings that are missing from the linked article, I have updated your sample with them so you can use them directly:

n/a
Top achievements
Rank 1
Iron
commented on 22 Nov 2023, 05:44 AM

Hi, Vessy

Thank you very much for your case; it has been incredibly helpful to me! Is there a separate document or link available to review these localization strings for possible future modifications?

Vessy
Telerik team
commented on 24 Nov 2023, 05:02 PM

You are more than welcome, Qiushen :)

We try to update the localization messages in the Globalization article of each component regularly, but do let us know if we missed something (like the strings above) and we will take care as soon as possible.

Michal
Top achievements
Rank 1
commented on 12 Nov 2024, 02:45 PM

How to use predefined messages in kendo-ui for example in this location: node_modules/@progress/kendo-ui/js/messages/kendo.messages.de-DE.js (or other languages) and do not load it manually using loadMessages like in example above? How to make it in more dynamic way? 
Vessy
Telerik team
commented on 14 Nov 2024, 01:45 PM | edited

Hi, Michal,

I am afraid that Kendo UI for Vue does not provide built-in localization messages like Kendo UI an the only way to apply the desired translations is by using the loadMessages method.

Michal
Top achievements
Rank 1
commented on 15 Nov 2024, 06:42 AM | edited

Hi Vessy 

Do not take me wrong but I don't think you're right about two things:

  1. We talk in this topic about the Vue library, not React
  2. React has a repo where Telerik starts creating a translation for messages: https://github.com/telerik/kendo-react-messages and I saw that you do changes on that repo - then why did you write that: "I am afraid that KendoReact does not provide built-in localization messages..." ???

Then I back to my original question:

How I can use in VUE files with messages from kendo-ui like this kendo-ui/js/messages/kendo.messages.de-DE.js ?

Vessy
Telerik team
commented on 15 Nov 2024, 11:56 AM

Hi, Michal,

Apologies for the lapse - I wrote KendoReact by mistake (updated my previous reply with the correctly), but the shared information is actually true both for KendoReact and Kendo UI for Vue - https://www.telerik.com/kendo-vue-ui/components/intl/localization/loading-messages.

As for the linked KendoReact repo - it contains translations for different languages provided either by the team or by the KendoReact clients which are not built-in the kendo-react- packages, but are also loaded via the loadMessages method.

I hope the provided information sheds some more light on the specifics around the Kendo UI for Vue Native and KendoReact localization.

Tags
Grid Localization
Asked by
n/a
Top achievements
Rank 1
Iron
Answers by
Vessy
Telerik team
Share this question
or