<scriptsrc="~/lib/jsrender/jsrender.min.js">script> <scriptsrc="~/lib/syncfusion-javascript/Scripts/ej/web/ej.web.all.min.js">script> <scriptsrc="~/lib/syncfusion-javascript/Scripts/ej/common/ej.globalize.min.js">script> <scriptsrc="~/syncfusion/i18n/ej.culture.de-DE.min.js">script> <scriptsrc="~/syncfusion/l10n/ej.localetexts.de-DE.min.js">script>
<script>
if(typeof(ej.globalize)!='undefined'){
console.log('@System.Threading.Thread.CurrentThread.CurrentCulture.Name');
ej.globalize.preferredCulture("de-DE");
console.log(ej.globalize.format(53422,'C'));//FormattingPrice
console.log(ej.globalize.format(newDate(2016,07,15),'D'));//Formattingdate
console.log(ej.globalize.format(123123.576,'n2'));//Formattingnumber
}
script>
<scriptsrc="~/syncfusion/i18n/ej.culture.@(System.Threading.Thread.CurrentThread.CurrentCulture.Name).min.js">script>
<script src="@Url.Content("~/js/jsrender.min.js")"></script>
<script src="@Url.Content("~/js/ej/ej.web.all.min.js")"></script>
<script src="~/js/ej/i18n/ej.culture.de-DE.js"></script>
<script src="~/js/ej/l10n/ej.localetexts.de-DE.js"></script> |
Hi Shameer,
maybe I wasn't precise enough with my questions.
First of all - thank you for the answer and the sample.
Unfortunately the sample shows something I allready have.
It's more or less a prove of the problems I got...
l10n must exist - else the system fails.
There is no "hidden source" for those files - they simply do not exist.
I have to write locale="...." on every single control.
Missing (just an example) de-AT l10n files...
And your idea "write the file at your own..." is not really possible.
YES I could write the de-AT (using de-DE as base since they are very close).
The same for de-CH - but what about the big rest which is missing??????
Anyhow - you may have overseen my question about the scripts:
<script> if(typeof(ej.globalize)!='undefined'){ console.log('@System.Threading.Thread.CurrentThread.CurrentCulture.Name'); ej.globalize.preferredCulture("de-DE"); console.log(ej.globalize.format(53422,'C'));//FormattingPrice console.log(ej.globalize.format(newDate(2016,07,15),'D'));//Formattingdate console.log(ej.globalize.format(123123.576,'n2'));//Formattingnumber } script>
Could you tell me how to make this work???
If I copy this to the project you provided - it still shows "english formats" - or in other words - it doesn't work.
And one more question about it:
ej.globalize.preferredCulture("de-DE");
If I write this - does it also work for controls?
So that I don't have to write locale="...." on every singe control?
Thank you
Manfred
Hi,
although it's nice that you are willing to provide a de-AT this doesn't fix the problem as long as localization is not completely done I can't rely on it since I don't know where my visitors come from.
WHAT ABOUT THE SCRIPTS?
Is there a way to make them working?
Regards
Manfreds
[scripts reference]
<script src="@Url.Content("~/js/jsrender.min.js")"></script>
<script src="@Url.Content("~/js/ej/ej.web.all.min.js")"></script>
<script src="~/js/ej/i18n/ej.culture.de-DE.js"></script>
<script src="~/js/ej/l10n/ej.localetexts.de-DE.js"></script>
<script>
ej.setCulture("de-DE")
</script> |
Grid.Inject(Toolbar, ExcelExport, Page);
declare var require: any;
loadCldr(
require('cldr-data/main/ar/numbers.json'),
require('cldr-data/main/ar/ca-gregorian.json'),
require('cldr-data/main/ar/numbers.json'),
require('cldr-data/supplemental/numberingSystems.json'),
require('cldr-data/main/ar/timeZoneNames.json')
);
let grid: Grid = new Grid({
dataSource: data,
locale:'ar',
allowExcelExport: true,
toolbar: ['ExcelExport'],
columns: [
. . .
],
height: 315
});
grid.appendTo('#Grid'); |