We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

localization in spanish


I want to show a grid in Spanish, but I only get it if I write this code on the page:

 ej.Grid.Locale["es-ES"] = {
     EmptyRecord: "No hay registros que mostrar",
     GroupDropArea: "Arrastre un encabezado de columna aquí para agrupar su columna",
     DeleteOperationAlert: "No hay registros seleccionados para la operación de eliminación",
     EditOperationAlert: "No hay registros seleccionados para la operación de edición",
     SaveButton: "Salvar",

 $(function () {
        Locale: "es-ES",
        allowPaging: true,
In the master.page I have this:

    <script src="Scripts/jquery-3.1.1.min.js"></script>
    <script src="Scripts/jsrender.min.js"></script>
    <script src="Scripts/ej/ej.web.all.min.js"></script>
    <script src="Scripts/ej/ej.webform.min.js"></script>
    <script src="Scripts/globalize.culture.es-ES.min.js"></script>
    <script src="Scripts/ej/i18n/ej.culture.es-ES.min.js"></script>
    <script src="Scripts/ej/l10n/ej.locatetexts.es-ES.js"></script>

This works well, but I would like to use the .js files but it does not work for me. What do I have wrong?


4 Replies

JU Juan December 23, 2016 08:54 AM UTC

I have managed to translate the grid if I put the following line in the aspx page instead of the master.page:

<script src="Scripts/ej/l10n/ej.localetexts.es-ES.js"></script>

But the Pager.Locale does not translate it. Any ideas?


SA Saravanan Arunachalam Syncfusion Team December 23, 2016 09:22 AM UTC

Hi Juan, 
Thanks for contacting Syncfusion’s support. 
We have analyzed your provided code snippet and we suspect that you have used jquery’s localization instead of ej’s localization and you did misspelled of ej.localetexts.es-ES.js on script reference which may be the cause of the issue. 
So, we suggest you to remove the globalize.culture.es-ES.min.js and ej.culture.es-ES.min.js from the script reference and ensure ej.localetexts.es-ES.js is spelled correctly. Please refer refer to the below code example and online documentation link. 
    . . . 
    <link rel='nofollow' href="assets-src/css/web/bootstrap-theme/ej.web.all.css" rel="stylesheet" /> 
    <script src="assets-src/external/jquery-3.1.1.min.js"></script> 
    <script src="assets-src/external/jsrender.min.js"></script> 
    <script src="assets-src/scripts/jsondata.min.js"></script> 
    <script src="assets/scripts/web/ej.web.all.min.js"></script> 
    <script src="assets-src/scripts/l10n/ej.localetexts.es-ES.js"></script> 
   $(function () { 
               . . .  
               locale: "es-ES", 
And also you can download the ej.localetext for different culture from the below github location. 
Note: If you render the Grid in javascript, no need to refer the ej.webform.min.js file. 
Saravanan A. 

JU Juan December 23, 2016 12:14 PM UTC

Thank you very much, it works perfectly.


SA Saravanan Arunachalam Syncfusion Team December 27, 2016 04:35 AM UTC

Hi Juan,  
Thanks for your update.            
We are happy that the provided information helped you. 
Saravanan A. 

Live Chat Icon For mobile
Up arrow icon