Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

how localization custom button title in angular2+?

Answered
mostafa asked on October 29, 2020

 tabs.unshift({
          id: “fm-tab-newtab”,
          title: “Save report”,
          handler: saveSlice,
          icon: this.icons.save
        });

i want to translate the lable “Save report” when the language change.

3 answers

Public
Milena Pechura Milena Pechura Flexmonster November 2, 2020

Hello, Mostafa,
 
Thank you for posting to our forum and for providing the code snippet.
 
Taking into account your case, we would like to suggest two approaches: the first one to redefine the Flexmonster label (e.g. "save"), second – to add a new label to our list.
 
1. To redefine one of the Flexmonster labels, please set the new value in the localization object. Here is an example for illustration: http://jsfiddle.net/flexmonster/51f7mqju/. Please note that we have also defined the new handler for the tab in the customizeToolbar function.
 
2. To add the new label to the component labels list, our team suggests the approach shown in the following sample: https://jsfiddle.net/flexmonster/q2rgvLhq/.
We updated the Toolbar with the new expand_all label and set the title of the tab correspondingly. After configuring the new label, we defined the localization for it.
 
For further details about localization in Flexmonster, please see this article.
 
Please let us know if our recommendations work for you and if any other questions arise.
 
Best regards,
Milena

Public
Milena Pechura Milena Pechura Flexmonster November 11, 2020

Hi, Mostafa,
 
We were wondering if our response helped you with your question.
Could you please let us know whether one of the suggested approaches works for you?
 
Looking forward to hearing from you.
 
Kind regards,
Milena

Public
Milena Pechura Milena Pechura Flexmonster November 18, 2020

Hello, Mostafa,
 
We are just checking in to ask if you have found our response helpful.
Please let us know if you have managed to translate the label.
 
Our team would be glad to hear your feedback.
 
Best regards,
Milena

Please login or Register to Submit Answer