The viewer interface can be shown in different languages by loading a localization file. This example sets a Portuguese localization.

Viewer setup. Configure the viewer, load the report, assign it to the component, and process the requests or events raised by the UI.
@Component({
    selector: "localizing-the-viewer",
    imports: [Viewer],
    template: `<sti-viewer [report]="report" [options]="viewerOptions"></sti-viewer>`
})
export class LocalizingTheViewer {
    report = new Stimulsoft.Report.StiReport();
    viewerOptions = new Stimulsoft.Viewer.StiViewerOptions();
    constructor() {
        this.report.loadFile("Reports/SimpleList.mrt");
        Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile("Localizations/pt.xml");
    }
}
StiLocalization.setLocalizationFile loads the language file for the whole Stimulsoft interface. Localization files ship with the product and can be edited or created.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.