HTML5 Localization

Stimulsoft Ultimate discussion
Post Reply
dikan
Posts: 170
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

HTML5 Localization

Post 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
Lech Kulikowski
Posts: 6239
Joined: Tue Mar 20, 2018 5:34 am

Re: HTML5 Localization

Post by Lech Kulikowski »

Hello,

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

Thank you.
dikan
Posts: 170
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

Re: HTML5 Localization

Post 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
Lech Kulikowski
Posts: 6239
Joined: Tue Mar 20, 2018 5:34 am

Re: HTML5 Localization

Post by Lech Kulikowski »

Hello,

You should add set method.

Thank you.
Attachments
Screenshot 2023-05-17 114559.png
Screenshot 2023-05-17 114559.png (201.63 KiB) Viewed 8433 times
dikan
Posts: 170
Joined: Thu Jun 18, 2009 5:05 pm
Location: Serbia

Re: HTML5 Localization

Post by dikan »

Thank you. Now I have working example...


Best regards,

dikan
Lech Kulikowski
Posts: 6239
Joined: Tue Mar 20, 2018 5:34 am

Re: HTML5 Localization

Post by Lech Kulikowski »

Hello,

You are welcome.
Post Reply