Localization and Globalization

13 Feb 20196 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.

  • CSHTML
  • @Html.EJ().Pivot().PivotGrid("PivotGrid1").Locale("fr-FR").ClientSideEvents(events => events.AfterServiceInvoke("OnAfterServiceInvoke") ...)
    
    @Html.EJ().Pivot().PivotSchemaDesigner("PivotSchemaDesigner1").Layout(PivotSchemaDesignerLayout.Excel)
    
    @Html.EJ().Pivot().PivotPager("Pager1").Mode(PivotPagerMode.Both).Locale("fr-FR").TargetControlID("PivotGrid1")
    
    < script type = "text/javascript" >
        function OnAfterServiceInvoke(args) {
            if (args.action == "initialize")
                $("#PivotSchemaDesigner1").ejPivotSchemaDesigner({
                    pivotControl: this,
                    layout: ej.PivotSchemaDesigner.Layouts.Excel,
                    locale: "fr-FR"
                });
        }
      ej.PivotSchemaDesigner.Locale["fr-FR"] = {
            ClearFilter: "Effacer le filtre",
            SelectField:"sélectionnez Champ",
            Measures: "Mesures",
            Warning: "Avertissement",
            ....
            ....
        };
    
    
      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
    Total Total
    GrandTotal GrandTotal
    DoesNotBeginsWith N'a pas commence par
    DoesNotEndsWith Ne se termine par
    DoesNotContains Ne contient
    DoesNotEquals N'est pas égaux
    IsGreaterThan Est supérieure à
    IsGreaterThanOrEqualTo Est supérieure ou égale à
    IsLessThan Est inférieure à
    IsLessThanOrEqualTo Est inférieure ou égale à
    NumberFormatting Formatage des chiffres
    FrozenHeaders En-têtes congelé
    CellSelection Sélection de cellules
    CellContext Contexte cellulaire
    ColumnResize Redimensionner la colonne
    ExcelLikeLayout Comme la mise en page d'Excel
    FrozenHeader En-tête congelée
    AdvancedFiltering Filtrage avancé
    Amount Quantité
    Quantity Quantity
    Measures Mesures visant
    NumberFormats Les formats de nombre
    Exporting L'exportation
    FileName Nom de fichier
    ToolTip Extrémité de l'outil
    RTL RTL
    CollapseByDefault Par défaut l'effondrement
    EnableDisablePaging Enalbe / Désactiver la pagination
    PagingOptions Options d'appel
    CategoricalPageSize Taille de page catégorique
    SeriesPageSize Taille de page série
    HyperLink Hyper Link
    CellEditing Montage de cellules
    GroupingBar Bar de groupement
    SummaryCustomization Personnalisation Sommaire
    SummaryTypes Types Sommaire
    SummaryType Type de statistique
    EnableRowHeaderHyperlink Activer l'en-tête de ligne HyperLink
    EnableColumnHeaderHyperlink Activer l'en-tête de colonne HyperLink
    EnableValueCellHyperlink Activer la cellule Valeur HyperLink
    EnableSummaryCellHyperlink Activer la cellule de synthèse HyperLink
    HideGrandTotal Masquer Grand Total
    HideSubTotal Masquer Sous-total
    Both Les deux
    Sum Somme
    Average La moyenne
    Count Count
    Min Min
    Max Max
    Excel Excel
    Word Mot
    PDF PDF
    CSV CSV
    MultipleItems Plusieurs éléments
    All Tous les
    Search Recherchez

    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
    DoesNotBeginsWith N'a pas commence par
    DoesNotEndsWith Ne se termine par
    DoesNotContains Ne contient
    DoesNotEquals N'est pas égaux
    IsGreaterThan Est supérieure à
    IsGreaterThanOrEqualTo Est supérieure ou égale à
    IsLessThan Est inférieure à
    IsLessThanOrEqualTo Est inférieure ou égale à
    Sort Trier
    LabelFilterLabel Afficher les éléments pour lesquels l'étiquette
    ValueFilterLabel Afficher les éléments pour lesquels
    LabelFilters Les filtres de l'étiquette
    BeginsWith Commence par
    NotBeginsWith Commence pas avec
    EndsWith Se termine par
    NotEndsWith Pas une fin avec
    Contains Contient
    NotContains Contient pas
    ValueFilters Les filtres de valeur
    ClearFilter Clear Filter
    Equals Est égal à
    NotEquals Pas égaux
    GreaterThan Plus de
    GreaterThanOrEqualTo Supérieure ou égale à
    LessThan Moins de
    LessThanOrEqualTo Inférieure ou égale à
    Between Entre
    NotBetween Pas entre
    Search Recherchez

    The following table lists the default keywords in French culture for Pivot Pager.

    Keywords Values
    SeriesPage Série Page
    CategoricalPage Catégorique Page
    Error Error
    OK OK
    Close Fermer
    PageCountErrorMsg Entrez le numéro de page valide

    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\MVC\Samples\web\Scripts\cultures”.

  • CSHTML
  • //1036 refers to "fr-FR" culture.
    @Html.EJ().Pivot().PivotGrid("PivotGrid1").DataSource(dataSource => dataSource.Rows(rows=>{rows.FieldName("[Date].[Fiscal]").Add();}).Columns(columns=>{columns.FieldName("[Customer].[Customer Geography]").Add();}).Values(values => { values.Measures(measures => { measures.FieldName("[Measures].[Internet Sales Amount]").Add(); }).Axis(AxisName.Column).Add();})
    .Data("https://bi.syncfusion.com/olap/msmdpump.dll;Locale Identifier=1036;"").Catalog("Adventure Works DW 2008 SE").Cube("Adventure Works"))

    Localization and Globalization of Cube Info (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.
  • 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;

    Localization support in ASP NET MVC pivot grid OLAP mode

    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\MVC\Samples\web\Scripts\cultures”.

  • CSHTML
  • @Html.EJ().Pivot().PivotGrid("PivotGrid1").ClientSideEvents(clientSideEvents => clientSideEvents.Load("onLoad")).DataSource(dataSource => dataSource.Rows(rows => { rows.FieldName("Country").FieldCaption("Country").Add(); }).Columns(columns => { columns.FieldName("Product").FieldCaption("Product").Add(); }).Values(values => { values.FieldName("Amount").Format("currency").Add(); }))

    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.
  • C#
  • 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
    });
    //...

    Localization support ASP NET MVC pivot grid relational server mode

    RTL

    You can render our PivotGrid control from Right to Left by setting EnableRTL property to true.

  • CSHTML
  • @Html.EJ().Pivot().PivotGrid("PivotGrid1").Url(Url.Content("/OLAPService")).EnableRTL(true)

    Right to Left, aka RTL support in ASP NET MVC pivot grid control