ej.base.L10n.load({
'fr': {
'grid': {
'EmptyRecord': Aucun enregistrement à afficher',
'Filter': 'Filtre',
'cancel': 'Annuler',
'StartsWith':'Commence avec'
. . .
},
'pager': {
. . .
}
}
});
var grid = new ej.grids.Grid({
dataSource: data,
locale: ‘fr’,
allowGrouping: true,
allowPaging: true,
pageSettings: { pageSize: 6 },
columns: [
{ field: 'OrderID', headerText: 'Order ID', textAlign: 'Right', width: 120 },
{ field: 'CustomerID', headerText: 'Customer ID', width: 150 },
{ field: 'ShipCity', headerText: 'Ship City', width: 150 },
{ field: 'ShipName', headerText: 'Ship Name', width: 150 }
],
height: 220
});
grid.appendTo('#Grid'); |
ej.base.setCulture('fr');
var ajax = new ej.base.Ajax('/src/fr.json', 'GET', true);
ajax.onSuccess = function (value) {
//Assigning locale text value for Essential JS 2 components
ej.base.L10n.load(value);
};
ajax.send();
|
...
{
field: "TitreDateheure",
headerText: "Titre Date heure",
type:'datetime',
format: {format: 'dd/MM/yyyy hh:mm', type: 'datatime'},
width: 55
},
... |