Localization in viewer

Stimulsoft Reports.JS discussion
Post Reply
Alina
Posts: 6
Joined: Thu Apr 11, 2024 7:23 am

Localization in viewer

Post by Alina »

Hello!
I have one page with several tabs. Every tab has a report.
First report has a ru localization, others - eng.

Code: Select all

window.Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile("ru.xml");
I wrote this code every time I built a new report in one of the tabs and only once, but the situation is always the same. Tell me how to solve this problem, please?
Max Shamanov
Posts: 975
Joined: Tue Sep 07, 2021 10:11 am

Re: Localization in viewer

Post by Max Shamanov »

Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more detail?

Thank you.
Alina
Posts: 6
Joined: Thu Apr 11, 2024 7:23 am

Re: Localization in viewer

Post by Alina »

I have page with:
<div>
<!-- here tabs -->
<v-tabs v-model="tabIndex">
<v-tab v-for="(tab, index) in tabs" :key="index" @click="currentTab = tab">
<div>
<span>{{ tab.name }}</span>
<Icon :name-icon="'mdi-close'" @click.native="closeCards(tab.docId)" />
</div>
</v-tab>
</v-tabs>

<v-tabs-items v-model="tabIndex">
<v-tab-item v-for="tab in tabs" :key="tab.docId">
<div :id="tab.docId">
<!-- here view report -->
</div>
</v-tab-item>
</v-tabs-items>
</div>

Every tab has a report. The report is created in <div :id="tab.docId"></div>

Every time you open a new tab, the function for setting options is triggered:
setViewerOptions() {
const options = new window.Stimulsoft.Viewer.StiViewerOptions();
options.height = "95vh"
window.Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile("ru.xml"); // --------------------this string was supposed to set Russian on all tabs but it only works the first time, then the viewer in English
...
}
Lech Kulikowski
Posts: 7287
Joined: Tue Mar 20, 2018 5:34 am

Re: Localization in viewer

Post by Lech Kulikowski »

Hello,

Please send us a sample project that reproduces the issue for analysis.

Thank you.
Post Reply