How to change default language Viewer
How to change default language Viewer
Hi,
How i can change default language a Viewer Report.JS ?
Thank you
How i can change default language a Viewer Report.JS ?
Thank you
Re: How to change default language Viewer
Hello,
Use next commands to change language of viewer's GUI.
Add a new language to the Select UI language menu. The file is uploaded to a client when the language is selected.
Add a new language to the Select UI language menu and set it as a current language.
Remove all languages from the Select UI language menu, upload it to a client and set it as a current language.
All these commands should be used before the viewer is created.
Thank you.
Use next commands to change language of viewer's GUI.
Add a new language to the Select UI language menu. The file is uploaded to a client when the language is selected.
Code: Select all
Stimulsoft.Base.Localization.StiLocalization.addLocalizationFile("Localizations/pt-BR.xml", false, "Portuguese (Brazil)");
Code: Select all
Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile("Localizations/es.xml");
Code: Select all
Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile("Localizations/es.xml", true);
Thank you.
Re: How to change default language Viewer
Hi,
It's work !
Thank you !
It's work !
Thank you !
Re: How to change default language Viewer
Hello
We are always glad to help you!
Please let us know if you need any additional help.
Thank you.
We are always glad to help you!
Please let us know if you need any additional help.
Thank you.
Re: How to change default language Viewer
Can you help me get the language localization into the create viewer code? For example changing the viewer to Spanish or es.xml?
Code: Select all
function createViewer() {
// Specify necessary options for the viewer
var options = new Stimulsoft.Viewer.StiViewerOptions();
options.height = "100%";
options.appearance.scrollbarsMode = true;
options.toolbar.showDesignButton = true;
options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Direct;
options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Table;
options.toolbar.showAboutButton = false;
// Create an instance of the viewer
viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);
// Add the design button event
viewer.onDesignReport = function (e) {
this.visible = false;
if (designer == null) createDesigner();
designer.visible = true;
designer.report = e.report;
};
viewer.renderHtml("viewerContent");
}
Re: How to change default language Viewer
Hello.
You could load the localization files like in described in the article from our Help Center.
Thank you.
You could load the localization files like in described in the article from our Help Center.
Thank you.
Re: How to change default language Viewer
I tried adding the following line;
at the start of my createViewer function. But then the viewer doesn't load, without this line it works fine, in English. I'm trying to run the web page Client Side only. Could this cause the problem? or perhaps I'm just not understanding how to code it correctly?
Thanks for your help and patience.
Code: Select all
Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile("Localizations/es.xml");
Thanks for your help and patience.
Re: How to change default language Viewer
Debugging, running the web page locally. The code snippet;
Generates an error "Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource."
Which I believe is the browser security not wanting to let one file open up another file locally.
Perhaps there is another way for me to use localization for a client side web page?
Thanks
Code: Select all
Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile("localizations/es.xml");
Which I believe is the browser security not wanting to let one file open up another file locally.
Perhaps there is another way for me to use localization for a client side web page?
Thanks
Re: How to change default language Viewer
Hello,
We couldn't reproduce this bug.
Please send, show us all .html file for analysis.
Also, please try to check the last prerelease build.
Thank you.
We couldn't reproduce this bug.
Please send, show us all .html file for analysis.
Also, please try to check the last prerelease build.
Thank you.
Re: How to change default language Viewer
I've been migrating my current application over using the download trial, before l purchase. When I test localization with the Demo.html file, I get the Cross Origin request.
Thanks for your help, last thing I need to get figured out.
Thanks for your help, last thing I need to get figured out.
- Attachments
-
- error message
- Error_Message.jpg (214.32 KiB) Viewed 9061 times
-
- demo_test.zip
- sample html
- (5.6 MiB) Downloaded 437 times