Localization

28 Jun 20172 minutes to read

Localization and Globalization of Cube Info (Client Mode)

Content displayed within the PivotTreeMap control are obtained from the OLAP Cube. So following are the steps that needs to be done to get the localized and globalized Cube content.

  • To get localized data from OLAP Cube, we need to set “Locale Identifier” in the connection string to a specific culture in the “data” property present inside “dataSource”.
  • JS
  • //1036 refers to “fr-FR” culture.
    
    <div ng-controller="PivotTreeMapCtrl">
            <div id="PivotTreeMap1" ej-pivottreemap e-dataSource="dataSource"></div>
        </div>
        <script>
            angular.module('PivotTreeMapApp', ['ejangular']).controller('PivotTreeMapCtrl', function ($scope) {
                $scope.dataSource = {
                    data: "http://bi.syncfusion.com/olap/msmdpump.dll;Locale identifier=1036;",
                    ///...
                };
            });
        </script>

    Localization and Globalization of Cube Info (Server Mode)

    Content displayed within the PivotTreeMap control are obtained from the OLAP Cube. So following are the steps that needs to be done to get the localized and globalized Cube content.

    • To get the localized string based on different cultures, from OLAP Cube, we need to set “Locale Identifier” in the connection string to a specific culture.
    • To bind the globalized content in PivotTreeMap control, we need to set “Culture” and “OverrideDefaultFormatStrings” properties in OlapDataManager class to a specific culture.
  • C#
  • //1036 refers to “fr-FR” culture.
    string connectionString = "Data Source=localhost; Initial Catalog=Adventure Works DW; Locale Identifier=1036;";
    DataManager = new OlapDataManager(connectionString);
    DataManager.Culture = new System.Globalization.CultureInfo(1036);
    DataManager.OverrideDefaultFormatStrings = true;