Localization in EJ 1 ASP.NET MVC Pager

26 Apr 2018 / 1 minute to read

Pager has been provided with built in localization support with different culture.

Setting different culture to control

We can set different culture to Pager control using Locale API. While we change the culture of the control from default culture (English), the pager information text will be change accordingly. You can get the localized text by specifying the localized text file in your application and should be referred after ej.web.all.min.js file reference.

Also, you can set localizes text of your as shown below code snippet.

  • javascript
  • ej.Pager.Locale["es-ES"] = {
            pagerInfo: "{0} de {1} páginas ({2} artículos)",
            firstPageTooltip: "Ir a la primera página",
            lastPageTooltip: "Ir a la última página",
            nextPageTooltip: "Ir a la página siguiente",
            previousPageTooltip: "Ir a la página anterior",
            nextPagerTooltip: "Ir al siguiente Pager",
            previousPagerTooltip: "Ir a Pager anterior"
    ej.Pager.Locale["de-DE"] = {
            pagerInfo: "{0} von {1} Seiten ({2} Beiträge)",
            firstPageTooltip: "Zur ersten Seite",
            lastPageTooltip: "Zur letzten Seite",
            nextPageTooltip: "Zur nächsten Seite",
            previousPageTooltip: "Zurück zur letzten Seite",
            nextPagerTooltip: "Zum nächsten Pager",
            previousPagerTooltip: "Zum vorherigen Pager"