Hello,
We have added 2 custom items to the toolbar and we are not able to translate these items with ej2-locale library.
in the above snapshot, you can see that all the syncfusion provided toolbar items have been translated into french.
Hi Sumanth,
We have prepared a sample to meet your requirements.
Sample - Fzrcmu (forked) - StackBlitz
In this sample,
We have added a key with a value-pair object locale for French.
And use the added locale constant in the InsertField and InsertCondition
Output:
If you are using more than one language, you could refer to the attached sample. Otherwise, you can directly access the text of a custom toolbar item like below:
Code snippet:
Regards,
Balamurugan S
Hello Balamurugan,
Thank you for the update. However, this solution is not working for us as expected. The translation does not happen when we switch the language in the parent component. we set the "locale" property of documenteditor component when the changeLanguage event is triggered from the parent component.
Could you please help us with an example of having translations switch between 2 languages?
Hi Sumanth,
Sorry for the inconvenience. We have attached a modified sample to meet your requirements. Please find the below attached for your reference. And also we have attached a video for your reference.
Sample - Fzrcmu (forked) - StackBlitz
In this sample,
Added button; change locale.
After clicking the button, the locale is changed to French like below.
Again, click and the locale changed to Arabic.
You can see both languages have their own locale in the custom toolbar.
Regards,
Balamurugan S
Hello Balamurugan,
Thank you so much for the detailed demo. Much appreciated.
However, there is one more blocking issue with this implementation. The editor content is being reset to empty on setting the locale to the document editor component. The issue can be reproducible in the sample you have attached.
Is there any workaround to avoid this?
Before switching the language.
After switching the language.
Hi Sumanth,
We can reproduce the reported "Blank document opened while switching locale" issue with the provided details. Currently, we are validating and will get back to you by October 27, 2023.
Regards,
Balamurugan S
Hi Sumanth,
We need an additional timeline to validate this and will get back to you by November 1, 2023.
Regards,
Balamurugan S
Hello Balamurugan,
Could you please update me on this?
Regards,
-Sumanth K S
Gentle reminder!
Sumanth, we will update details shortly.
Sumanth,
Thanks for the update Suriya.