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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

localization in spanish

Thread ID:

Created:

Updated:

Platform:

Replies:

127974 Dec 22,2016 11:52 AM UTC Dec 27,2016 04:35 AM UTC JavaScript 4
loading
Tags: ejGrid
Juan
Asked On December 22, 2016 11:52 AM UTC

Hello,

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 () {
     $("#Grid1").ejGrid({
        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?

Thanks.









Juan
Replied On 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?

Thanks.






Saravanan Arunachalam [Syncfusion]
Replied On 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. 
[Html] 
<head> 
    . . . 
    <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> 
</head> 
[JS] 
   $(function () { 
             
            $("#Grid").ejGrid({ 
               . . .  
               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. 
Regards, 
Saravanan A. 


Juan
Replied On December 23, 2016 12:14 PM UTC

Thank you very much, it works perfectly.

Thanks.


Saravanan Arunachalam [Syncfusion]
Replied On December 27, 2016 04:35 AM UTC

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;