Localization and Globalization
28 Jun 2017 / 8 minutes to read
Localization in PivotGrid
You can localize the PivotGrid controls text with a collection of localized strings using ej.PivotGrid.Locale
for different cultures. By default, the PivotGrid control is localized in “en-US” culture.
<div ng-controller="PivotGridCtrl">
<!--Create a tag which acts as a container for PivotGrid-->
<div id="PivotGrid1" ej-pivotgrid e-url="url" e-enableVirtualScrolling="true" e-pivotTableFieldListID="pivotTableFieldListID" e-locale="fr-FR" />
<!--Create a tag which acts as a container for PivotTable Field List-->
<div id="PivotSchemaDesigner1" ej-pivotschemadesigner="" e-locale="fr-FR" ></div>
<!--Create a tag which acts as a container for Pager. -->
<div id="PivotPager1" ej-pivotpager e-mode="mode" e-targetcontrolid="PivotGrid1" e-locale="fr-FR" />
</div>
<script>
angular.module("PivotGridApp",["ejangular"]).controller('PivotGridCtrl', function ($scope)
{
$scope.url = "/Olap";
$scope.pivotTableFieldListID = "PivotSchemaDesigner1";
});
ej.PivotSchemaDesigner.Locale["fr-FR"] = {
ClearFilter: "Effacer le filtre",
SelectField:"sélectionnez Champ",
Measures: "Mesures",
Warning: "Avertissement",
AlertMsg:"Le champ que vous déplacez ne peut pas être placé dans cette zone du rapport",
Goal: "Goal",
Status:"Status",
Trend:"Trend",
...
...
};
ej.PivotGrid.Locale["fr-FR"] = {
Sort:"Tri",
SelectField: "sélectionnez Champ",
LabelFilterLabel:"Afficher les éléments pour lesquels l'étiquette",
ValueFilterLabel:"Afficher les éléments pour lesquels",
...
...
};
ej.PivotPager.Locale["fr-FR"] = {
SeriesPage: "Série Page",
CategoricalPage: "Catégorique Page"
};
</script>
The following table lists the default keywords in French culture for PivotGrid.
Keyword | Values |
---|---|
Sort | Tri |
SelectField | sélectionnez Champ |
LabelFilterLabel | Afficher les éléments pour lesquels l'étiquette |
ValueFilterLabel | Afficher les éléments pour lesquels |
LabelFilters | Filtres d'étiquetage |
BeginsWith | Commence par |
NotBeginsWith | Non Commence pa |
EndsWith | se termine par |
NotEndsWith | Non termine avec |
Contains | Contient |
NotContains | Ne contient pas |
ValueFilters | Filtres de valeur |
ClearFilter | Clear Filter |
Equals | Equals |
NotEquals | Not Equals |
GreaterThan | Supérieur |
GreaterThanOrEqualTo | supérieur ou égal à |
LessThan | Less Than |
LessThanOrEqualTo | Moins ou égal à |
Between | Entre |
NotBetween | Non Entre |
AddToFilter | Ajouter à filtre |
AddToRow | Ajouter à la rangée |
AddToColumn | Ajouter à la colonne |
AddToValues | Ajouter aux valeurs |
Warning | Avertissement |
Error | Error |
GroupingBarAlertMsg | Le champ que vous déplacez ne peut pas être placé dans cette zone du rapport |
Measures | Mesures |
Expand | Développer |
Collapse | Réduire |
ToolTipRow | Row |
ToolTipColumn | Colonne |
ToolTipValue | Value |
NoValue | Pas de valeu |
SeriesPage | Series Page |
CategoricalPage | Catégorique page |
DragFieldHere | champ de glisser ic |
ColumnArea | Drop colonne ici |
RowArea | Drop ligne ic |
ValueArea | Lâche valeurs ici |
Close | Fermer |
OK | OK |
Cancel | Annuler |
Remove | Supprimer |
Goal | Goal |
Status | Status |
Trend | Trend |
Value | value |
ConditionalFormattingErrorMsg | La valeur donnée ne correspond pas |
ConditionalFormattingConformMsg | Etes-vous sûr de vouloir supprimer le format sélectionné? |
EnterOperand1 | Entrez Opérande1 |
EnterOperand2 | Entrez Opérande2 |
ConditionalFormatting | Mise en forme conditionnelle |
Condition | Type conditionnel |
Value1 | Value1 |
Value2 | Value2 |
Editcondition | Modifier Condition |
AddNew | Ajouter |
Format | Format |
Backcolor | Back Color |
Borderrange | Border Range |
Borderstyle | Border Style |
Fontsize | Font Size |
Fontstyle | aille de la police |
Bordercolor | Couleur Bordure |
AliceBlue | AliceBlue |
Black | Noir |
Blue | Bleu |
Brown | Brown |
Gold | Gold |
Green | Green |
Lime | Lime |
Maroon | Bordeaux |
Orange | Orange |
Pink | Pink |
Red | rouge |
Violet | Violet |
White | Blanc |
Yellow | Jaune |
Solid | Solid |
Dashed | pointillée |
Dotted | Dotted |
Double | Double |
Groove | Groove |
Inset | Encart |
Outset | Outset |
Ridge | Ridge |
None | Aucun |
Algerian | Algérie |
Arial | Arial |
BodoniMT | Bodoni MT |
BritannicBold | Britannic Bold |
Cambria | Cambria |
Calibri | Calibri |
CourierNew | Courier New |
DejaVuSans | DejaVu Sans |
Forte | Forte |
Gerogia | Gerogia |
Impact | Impact |
SegoeUI | Segoe UI |
Tahoma | Tahoma |
TimesNewRoman | Times New Roman |
Verdana | Verdana |
CubeDimensionBrowser | Navigateur Dimension Cube |
SelectHierarchy | Sélectionnez Hiérarchie |
CalculatedField | Champ calculé |
Name | nom |
Add: | Ajouter: |
Formula | Formule: |
Delete | Supprimer |
Fields | Champs |
CalculatedFieldNameNotFound | Prénom CalculatedField est introuvable |
InsertField | Insérer un champ |
EmptyField | S'il vous plaît entrez le nom de champ calculé ou la formule |
NotValid | formule donnée est pas valide |
NotPresent | champ Valeur utilisée dans toute la formule de champ calculé est pas présent dans le PivotGrid |
Confirm | champ calculé avec le même nom existe déjà en raison de vouloir remplacer.? |
CalcValue | Champ calculé peut être inséré que dans le champ de la zone de valeur |
The following table lists the default keywords in French culture for PivotTable Field List.
Keywords | Values |
---|---|
PivotTableFieldList | Liste de champs de tableau croisé dynamique |
ChooseFieldsToAddToReport | Choisissez champs à ajouter à Signaler" |
DragFieldBetweenAreasBelow | Faites glisser terrain entre les zones ci-dessous |
ReportFilter | Rapport Filtre |
ColumnLabel | colonne Étiquette |
RowLabel | Label Row |
Values | Valeurs |
ClearFilter | Effacer le filtre |
SelectField | sélectionnez Champ |
Measures | Mesures |
Warning | Avertissement |
AlertMsg | Le champ que vous déplacez ne peut pas être placé dans cette zone du rapport |
Goal | Goal |
Status | Status |
Trend | Trend |
AddToFilter | Ajouter à filtrer |
AddToRow | Ajouter à la rangée |
AddToColumn | Ajouter à la colonne |
AddToValues | Ajouter à la valeur |
DeferLayoutUpdate | Différer Mise à jour |
Update | Mettre à jour |
OK | OK |
Cancel | Annuler |
Close | Fermer |
The following table lists the default keywords in French culture for Pivot Pager.
Keywords | Values |
---|---|
SeriesPage | Série Page |
CategoricalPage | Catégorique Page |
Localization and Globalization of Cube Info (Client Mode)
Content displayed within the PivotGrid 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”.
- To bind the globalized content in PivotGrid control, we need to set “locale” property to a specific culture and want to refer specific culture file in the sample.
NOTE
Culture files are present under “[installed drive]:\Users\ [user name]\AppData\Local\Syncfusion\EssentialStudio\X.X.X.X\JavaScript\samples\web\scripts\cultures”.
//1036 refers to “fr-FR” culture.
<div ng-controller="PivotGridCtrl">
<div id="PivotGrid1" ej-pivotgrid e-datasource="datasource" e-locale="fr-FR" />
</div>
<script>
angular.module("PivotGridApp",["ejangular"]).controller('PivotGridOlapCtrl', function ($scope) {
$scope.dataSource = {
///...
};
$scope.datasource = $scope.dataSource;
})
</script>
Localization and Globalization of Cube (Server Mode)
Content displayed within the PivotGrid 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, you need to set “Locale Identifier” in the connection string to a specific culture.
- To bind the globalized content in PivotGrid control, you need to set “Culture” and
OverrideDefaultFormatStrings
properties in OlapDataManager class to a specific culture.
//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;
Localization and Globalization of Relational Info (Client Mode)
Content displayed within the PivotGrid control are obtained from the Relational datasource. So following are the steps that needs to done to get localized as well as globalized content.
- To get the localized content, the Relational datasource must have localized headers in them which will be directly applied to PivotGrid.
- To globalize the values appear in PivotGrid , we need to set “format” and “locale” property to a specific culture and want to refer specific culture file in the sample.
NOTE
Culture files are present under “[installed drive]:\Users\ [user name]\AppData\Local\Syncfusion\EssentialStudio\X.X.X.X\JavaScript\samples\web\scripts\cultures”.
<div ng-controller="PivotGridCtrl">
<div id="PivotGrid1" ej-pivotgrid e-datasource="datasource" e-locale="fr-FR" />
</div>
<script>
var pivot_dataset = []; // Specify Data source
var dataSource = {
///...
values: [{
fieldName: "Amount",
fieldCaption: "Amount",
format: "currency"
}]
};
angular.module("PivotGridApp",["ejangular"]).controller('PivotGridCtrl', function ($scope)
{
$scope.datasource = dataSource;
});
</script>
Localization and Globalization of Relational Info (Server Mode)
Content displayed within the PivotGrid control are obtained from the Relational datasource. So following are the steps that needs to done to get localized as well as globalized content.
- To get the localized content, the Relational datasource must have localized headers in them which will be directly applied to PivotGrid.
- “Format” settings in PivotComputationInfo class would globalize the values appear in PivotGrid.
PivotReport pivotSetting = new PivotReport();
//...
pivotSetting.PivotCalculations.Add(new PivotComputationInfo {
CalculationName = "Amount", Description = "Amount", FieldHeader = "Amount", FieldName = "Amount", Format = "E", SummaryType = Syncfusion.PivotAnalysis.Base.SummaryType.DoubleTotalSum
});
//...
RTL
You can render our PivotGrid control from Right to Left by setting e-enableRTL
property to true.
<div ng-controller="PivotGridCtrl">
<div id="PivotGrid1" ej-pivotgrid e-datasource="datasource" e-enableRTL="true" />
</div>