Localization in chart

Hi,

I'm trying to translate a chart in french. So, I use load function like this in my js code but it doesn't work:

    ej.base.L10n.load({
        'fr-FR': {
            'Chart': {
                'ZoomIn': 'Zoom +',
                'ZoomOut': 'Zoom -',
                'Pan': 'Se déplacer',
                'Reset': 'Réinitialiser',
                'High': 'Max',
                'Low': 'Min'
            }
        }
    });
    ej.base.setCulture('fr-FR');


What could I forget or do wrong ?

1 Reply

DD Dharanidharan Dharmasivam Syncfusion Team October 5, 2018 11:02 AM UTC

Hi CD, 
 
Greeting from Syncfusion. 
 
We have analyzed your query with attached code snippet. In your code, you have given the control name’s first letter in uppercase. So, the locale constants are not replaced in set culture method. Kindly change this to lower case as highlighted below, so that localization will work properly. Please find the below code snippet, 
 
 
ej.base.L10n.load({ 
        "fr-FR": { 
            "chart": { 
                "ZoomIn": "Zoom +", 
                "ZoomOut": "Zoom -", 
                "Pan": "Se déplacer", 
                "Reset": "Réinitialiser" 
            } 
        } 
    }); 
    ej.base.setCulture("fr-FR"); 
 
Screenshot: 
 
 
Sample for reference can be find below. 
 
Also, we would like to let you know that only the following texts in zooming toolbars can be changed with respect to your culture. 
 
  • Zoom,
  • ZoomIn
  • ZoomOut
  • Reset
  • Pan
  • ResetZoom
 
Regards, 
Dharani. 


Loader.
Up arrow icon