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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid Globalizaiton not working on production build

Thread ID:

Created:

Updated:

Platform:

Replies:

147814 Sep 25,2019 01:17 AM UTC Sep 25,2019 12:16 PM UTC Angular - EJ 2 1
loading
Tags: Grid
adrian
Asked On September 25, 2019 01:17 AM UTC

I'm trying to change the default text content of the Grid to Spanish. Everything works well on development `ng serve` but when I try to compile for production `ng build --prod` I get the following errors:

users.component.html(7,5): Property 'es' does not exist on type 'UsersComponent'.
users.component.html(7,5): Property 'GT' does not exist on type 'UsersComponent'.

My html:
<ejs-grid #users [dataSource]='dataSource'
[allowPaging]='true'
[allowFiltering]='true'
[editSettings]="editSettings"
[toolbar]="toolbar"
[locale]='es-GT'
(actionBegin)="actionBegin($event)"
(actionComplete)="actionComplete($event)"
>

and my ts:
import { L10n, setCulture } from '@syncfusion/ej2-base';

setCulture('es-GT');

L10n.load({
'es-GT': {
grid: {
EmptyRecord: 'Sin registros por mostrar',
Item: 'Registro',
Items: 'Registros',
Edit: 'Editar',
Add: 'Agregar',
Delete: 'Borrar',
EditOperationAlert: 'Debe seleccionar un registro primero',
DeleteOperationAlert: 'Debe seleccionar un registro primero',
SaveButton: 'Grabar',
CancelButton: 'Cancelar',
ConfirmDelete: 'Seguro que desea borrar el registro?'
},
pager: {
currentPageInfo: '{0} de {1} paginas',
totalItemsInfo: '({0} registros)',
firstPageTooltip: 'Ir a la primera pagina',
lastPageTooltip: 'Ir a la ultima pagina',
nextPageTooltip: 'Ir a la siguiente pagina',
previousPageTooltip: 'Ir a la pagina anterior',
}
}
});

@Component({
selector: 'app-users',
templateUrl: './users.component.html',
styleUrls: ['./users.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class UsersComponent implements OnInit {

Thanks for the help

Pavithra Subramaniyam [Syncfusion]
Replied On September 25, 2019 12:16 PM UTC

Hi Adrian, 

Greetings from Syncfusion support. 

You can overcome the reported issue by correcting the locale property binding. Please refer the below code blocks 

[app.component.html

<ejs-grid #grid [dataSource]='data' [editSettings]='editSettings'  locale='es-GT'  [allowPaging]='true'> 

. . . . . . . . 

</ejs-grid>  
  
If you still have the problem, kindly get back to us with more details like Syncfusion package version. 

Regards, 
Pavithra S. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon