[Inject]
protected IJSRuntime JsRuntime { get; set; }
protected override async Task OnInitializedAsync()
{
var data = await Http.GetJsonAsync<object>("ej2-locale/src/it.json");
var sup1 = await Http.GetJsonAsync<object>("cldr-data/supplemental/numberingSystems.json");
var sup2 = await Http.GetJsonAsync<object>("cldr-data/main/it/timeZoneNames.json");
var sup3 = await Http.GetJsonAsync<object>("cldr-data/main/it/ca-gregorian.json");
var sup4 = await Http.GetJsonAsync<object>("cldr-data/main/it/numbers.json");
var cldrData = new object[] { sup1, sup2, sup3, sup4 };
this.JSRuntime.Ejs().LoadLocaleData(data).LoadCldrData(cldrData).SetCulture("it").SetCurrencyCode("EUR");
} |
Hi Nevitha,
The sample is working and I managed to make the localization work in my project.
I will wait for your updates; however, my main problem was the "normal" localization, that now is working.
May I suggest you to correct the sample in your documentation?
https://ej2.syncfusion.com/blazor/documentation/common/globalization/?no-cache=1
Here it is stated that the client-side path is wwwroot/ej2-locale/src/de.json, while you put in the sample the following path: ej2-locale/src/de.json (without www), this is why it didn't work for me.
Thank you,
Riccardo