localization in spanish
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.
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.
SIGN IN To post a reply.
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?
Thanks.
<script src="Scripts/ej/l10n/ej.localetexts.es-ES.js"></script>
But the Pager.Locale does not translate it. Any ideas?
Thanks.
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.
|
[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.
JU
Juan
December 23, 2016 12:14 PM UTC
Thank you very much, it works perfectly.
Thanks.
Thanks.
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.
Regards,
Saravanan A.
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
-
JU Juan
- Dec 22, 2016 11:52 AM UTC
- Dec 27, 2016 04:35 AM UTC