Hello,
We already set the culture in it and is working fine in the grid table but when we use the aggregates feature it not works.
How can we change also here in the aggregates the currency symbol with "€" and format the number using "," in decimals and "." in thousands.
Kind Regards,
Andrea
Hi Andrea,
Thanks for contacting Syncfusion support.
Query: To change currency Symbol and Format when using Aggregates properties in Grid
By analyzing your query, you need to change the symbol and format of the currency based Italian culture (dot to separate thousand and comma to separate decimals) . We achieved it by using the loadCldr method. in this method, we have to pass the numbers and currencies parameter. The both parameters are imported from the JSON file which I attached with this.
For your convenience, we have attached code sample for your reference.
|
import * as currencies from './currencies.json'; import * as numbers from './numbers.json'; import it from './it.json';
ej.base.loadCldr(numbers, currencies); ej.base.setCulture('it'); // Change the culture ej.base.setCurrencyCode('EUR'); ej.base.L10n.load(it);
|
Sample: https://stackblitz.com/edit/wpngdc-yw6dzd?file=index.js
Please get back to us if you need further assistance on this.
Regards,
Mohammed Ansar ,
Hello thanks for your answer,
With the solution you provide is working only with the currency symbol which is changed correctly with € from $ but the format of the number is still wrong. We need to fomat the aggregate number using "," for decimal and "." for thousand. You can find attached the screenshot of our code.
As already mention this code implementation works fine with the number in normal column but not in the aggregates column.
Kind regards,
Andrea
Hi Andrea,
Greetings from Syncfusion support.
Query: To change the culture to Italian
Based on your query, we suspect that you initialize ‘it’ from it.json and then giving a name to Locale as ‘it-IT’. (it-IT was manually written translation by you ) where ‘it’ was doing the same thing for entire component so for your query, use ‘it’ in locale
|
import it from './it.json'; ej.base.loadCldr(numbers, currencies); ej.base.setCulture('it'); // Change the culture ej.base.setCurrencyCode('EUR'); ej.base.L10n.load(it);// Tanslate to Italian dataSource: data, locale: 'it', allowPaging: true, allowGrouping: true,
|
Sample: https://stackblitz.com/edit/wpngdc-kqif64?file=index.js
Please get back to us if you need further assistance on this.
Regards,
Mohammed Ansar ,