Page 1 of 1

HTML5 Localization

Posted: Mon May 15, 2023 7:46 pm
by dikan
I need a working example for HTML5 localization. I found an incomplete example (better to say some lines of code) but I need to see it as a working example.

Best regards,

dikan

Re: HTML5 Localization

Posted: Mon May 15, 2023 10:01 pm
by Lech Kulikowski
Hello,

Please check the following article:
https://stimulsoft.zendesk.com/hc/en-us ... Reports-JS

Thank you.

Re: HTML5 Localization

Posted: Tue May 16, 2023 7:26 pm
by dikan
I followed your link and it does not help me.
I have the following code inside html page and report is working but only in English what is not preferable language in Serbia:
function Start() {
Stimulsoft.Base.StiLicense.loadFromFile("license.key");
var report = Stimulsoft.Report.StiReport.createNewReport();
Stimulsoft.Base.Localization.StiLocalization.addLocalizationFile("localization/sr.xml", false, "Srpski
report.loadFile("REPORTS/obavezeSkoro.mrt");
var dataSet = new Stimulsoft.System.Data.DataSet("obaveze");
dataSet.readJsonFile("obaveze.json");
report.dictionary.databases.clear();
report.regData("obaveze","obaveze", dataSet);
report.dictionary.variables.getByName("I_ODDAT").valueObject = "2020/01/01";
report.dictionary.variables.getByName("I_DODAT").valueObject = "2050/12/31";

var options = new Stimulsoft.Viewer.StiViewerOptions();
options.appearance.fullScreenMode = true;

var viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);

viewer.report = report;
viewer.renderHtml("viewerContent");
}

Please feel free to correct my code to display Serbian language by default.

Regards,

dikan

Re: HTML5 Localization

Posted: Wed May 17, 2023 9:46 am
by Lech Kulikowski
Hello,

You should add set method.

Thank you.

Re: HTML5 Localization

Posted: Thu May 18, 2023 8:58 am
by dikan
Thank you. Now I have working example...


Best regards,

dikan

Re: HTML5 Localization

Posted: Thu May 18, 2023 8:08 pm
by Lech Kulikowski
Hello,

You are welcome.