Cannot load localization

Stimulsoft Reports.WPF discussion
Post Reply
msglobal
Posts: 6
Joined: Wed Feb 22, 2017 8:00 pm

Cannot load localization

Post by msglobal »

My Stimuls Designer is set to run in English because it's easier to work in English. However, my WPF application needs to open the StiWpfRibbonViewerControl in Portuguese.

I tried the following

C#

Code: Select all


byte[] array = Encoding.UTF8.GetBytes(Resources.pt_BR); // this is the XML file string
var stream = new MemoryStream(array);
StiOptions.Localization.Load(stream);
reportViewer.Report = GetMyReport();

XAML:

Code: Select all

<wpfViewer:StiWpfRibbonViewerControl x:Name="reportViewer"/>

It's not working though. Please can somebody help me?
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Cannot load localization

Post by HighAley »

Hello.

Please, try to use this code before the initialization of the Viewer.

Thank you.
msglobal
Posts: 6
Joined: Wed Feb 22, 2017 8:00 pm

Re: Cannot load localization

Post by msglobal »

Thank you! That worked. I put my code before the InitializeComponent() method of the window.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Cannot load localization

Post by HighAley »

Hello.

We are always glad to help you.
Let us know if you need our help.

Thank you.
Post Reply