File Name |
Path |
ca-gregorian |
cldr/main/en/ca-gregorian.json |
timeZoneNames |
cldr/main/en/timeZoneNames.json |
numbers |
cldr/main/en/numbers.json |
numberingSystems |
cldr/supplemental/numberingSystems.json |
currencies |
cldr/main/en/currencies.json |
protected override void OnAfterRender()
{
this.JsRuntime.Ejs().LoadLocaleData("wwwroot/de.json").LoadCldrData(new string[] { "wwwroot/scripts/cldr-data/main/de/currencies.json", "wwwroot/scripts/cldr-data/main/de/numbers.json", "wwwroot/scripts/cldr-data/main/de/ca-gregorian.json", "wwwroot/scripts/cldr-data/main/de/timeZoneNames.json", "wwwroot/scripts/cldr-data/supplemental/numberingSystems.json" }).SetCulture("de");
}
|
npm install cldr-data
|
protected override async Task OnInitializedAsync()
{
var data = await Http.GetJsonAsync<object>("localefiles/de.json");
var sup1 = await Http.GetJsonAsync<object>("localefiles/cldr-data/supplemental/numberingSystems.json");
var sup2 = await Http.GetJsonAsync<object>("localefiles/cldr-data/main/de/ca-gregorian.json");
var sup3 = await Http.GetJsonAsync<object>("localefiles/cldr-data/main/de/numbers.json");
var sup4 = await Http.GetJsonAsync<object>("localefiles/cldr-data/main/de/timeZoneNames.json");
var sup5 = await Http.GetJsonAsync<object>("localefiles/cldr-data/main/de/currencies.json");
var cldrData = new object[] { sup1, sup2, sup3, sup4 ,sup5};
this.JsRuntime.Ejs().LoadLocaleData(data).LoadCldrData(cldrData).SetCulture("de").SetCurrencyCode("EUR");
}
|