Localizing the Viewer
Our sample projects and report templates can help you learn the basics of working with our products.The viewer interface can be localized by loading a Stimulsoft language XML file before it renders.
In React.
How it works. The viewer reads its captions from the loaded file, so switching language is a single call.
In React.
import { Viewer, Stimulsoft } from "stimulsoft-dashboards-js-react/viewer";
function App() {
var report = new Stimulsoft.Report.StiReport();
report.loadFile("Dashboards/Dashboard.mrt");
Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile("Localizations/pt.xml");
var options = new Stimulsoft.Viewer.StiViewerOptions();
options.appearance.fullScreenMode = true;
return <Viewer options={options} report={report} />;
}StiLocalization.setLocalizationFile(path)— load the UI language file (e.g. Portuguese); the viewer captions switch to it.
How it works. The viewer reads its captions from the loaded file, so switching language is a single call.