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

Grid Globalizaiton not working on production build

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'

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


'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',

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

Thanks for the help

1 Reply

PS Pavithra Subramaniyam Syncfusion Team 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 


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

. . . . . . . . 

If you still have the problem, kindly get back to us with more details like Syncfusion package version. 

Pavithra S. 

Live Chat Icon For mobile
Up arrow icon