Cloud
Cloud-Dienstleistung für schnelle und effektive Analyse und Visualisierung von Daten für Ihr Business ohne eigene Applikationen zu erstellen oder zu programmieren.
import { Viewer, Stimulsoft } from 'stimulsoft-reports-js-react/viewer';
function App() {
const [selectedCountry, setSelectedCountry] = useState('en-US');
const locFile = `Localizations/` + selectedCountry.substring(0, 2) + '.xml';
Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile(locFile);
var report = new Stimulsoft.Report.StiReport();
report.loadFile('Reports/Globalization.mrt');
report.culture = selectedCountry;
return (
<div className='container'>
<div className='container-control'>
<label className='label-globalization'>Select Language</label>
<select
value={selectedCountry}
onChange={(e) => setSelectedCountry(e.target.value)}
className='select-globalization'
>
<option value='en-US'>English</option>
<option value='de-DE'>Deutsch</option>
<option value='pl-PL'>Polish</option>
</select>
</div>
<div>
<Viewer key={selectedCountry} report={report} />
</div>
</div>
);
}
export default App;report.culture controls culture-dependent formatting, while StiLocalization.setLocalizationFile changes the viewer interface language — together they globalize both the document and the UI.