Localization

Localization is the process of translating an application’s user interface based on specific cultures.

Localizing Dashboard Viewer

Syncfusion Dashboard Viewer is released with localization support.

The default language is English “en-US”.

Read the below documentation on how to add new localizations and how to edit existing localizations in the Syncfusion Dashboard Viewer.

How to add new localization

How to edit existing localizations

In the Dashboard Viewer widget definition added to an application, introduce the localeSettings object with inner objects resourcePath and culture set with respective values like shown below.

Example

  • JS
  • $('#dashboard').ejDashboardViewer(
           { 
              serviceUrl: 'service URL', 
              dashboardPath: 'Path of the dashboard',
              localeSettings: {
                    
                    resourcePath: "..//path//", //folder path of the Resources.<Culture Code>.xml file
                    culture: "en-US"   //culture of the customized language
                }, 
           });

    If the respective translation file is present in the localization folder of the Dashboard Service, then thelocaleSettings object with inner object culture is enough.

    Place the translation file in the below location:

    Dashboard Platform SDK :
    %localappdata%\Syncfusion\Dashboard Platform SDK\Service\Localization

    Dashboard Designer :
    C:\ProgramData\Syncfusion\DashboardDesigner\\IISExpress_DashboardService\Localization

    Dashboard Server :
    C:\Syncfusion\Dashboard Server\DashboardServer.Web\DashboardService\Localization

    Example

  • JS
  • $('#dashboard').ejDashboardViewer(
           { 
              serviceUrl: 'service URL', 
              dashboardPath: 'Path of the dashboard',
              localeSettings: {
                    culture: "pt-BR"  //culture for Portuguese (Brazil). Ensure that "pt-BR" translation file is already present in the {RootFolderOfDashboardService}\Localization folder. 
                }, 
           });

    NOTE

    If any of the values is missing in the XML file, the default culture value will be loaded for that particular name. If the target culture itself is missing in the XML file, the default culture will be loaded.