Localizing the Designer
Our sample projects and report templates can help you learn the basics of working with our products.The designer can offer several interface languages in its menu, loaded from Stimulsoft language XML files.
In Angular.
How it works. Each file registers a language in the menu, so users switch the designer's interface on demand.
In Angular.
import { Component } from "@angular/core";
import { Designer, Stimulsoft } from "stimulsoft-dashboards-js-angular/designer";
@Component({
imports: [Designer],
template: `<sti-designer [(report)]="report" [options]="options"></sti-designer>`
})
export class Example {
report: Stimulsoft.Report.StiReport;
options: Stimulsoft.Designer.StiDesignerOptions;
constructor() {
this.report = new Stimulsoft.Report.StiReport();
this.report.loadFile("Dashboards/Dashboard.mrt");
// Add languages to the designer's language menu
Stimulsoft.Base.Localization.StiLocalization.addLocalizationFile("Localizations/de.xml");
Stimulsoft.Base.Localization.StiLocalization.addLocalizationFile("Localizations/ja.xml", false, "MyLabel");
// Load one at startup and set it as default
Stimulsoft.Base.Localization.StiLocalization.addLocalizationFile("Localizations/pt.xml", true);
Stimulsoft.Base.Localization.StiLocalization.cultureName = "Portuguese";
this.options = new Stimulsoft.Designer.StiDesignerOptions();
this.options.appearance.fullScreenMode = true;
}
}addLocalizationFile(path)— add a language to the designer's menu; passtrueto load it at startup.cultureName— the default language selected before the designer opens.
How it works. Each file registers a language in the menu, so users switch the designer's interface on demand.