How to switch interface language of DesignerControl by code

Stimulsoft Reports.NET discussion
joero
Posts: 3
Joined: Fri Aug 17, 2007 6:40 am

How to switch interface language of DesignerControl by code

Post by joero »

Thanks Fabio and Edward!

I'm looking forward to this release.
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

How to switch interface language of DesignerControl by code

Post by Fabio Pagano »

I have tested the following code with new 2007.2 official version, and "seems" to work (i have to do a more hard testing anyway), this sets Italian language where the Localization file "it.xml" is in the designer directory, not in "Localization" subfolder, and menu "Select UI Interface" is not visible:

Code: Select all

Dim designer As New Stimulsoft.Report.Design.StiDesigner
        MainMenuService = Stimulsoft.Report.Design.StiMainMenuService.GetService(designer)
        Stimulsoft.Report.StiOptions.Configuration.DirectoryLocalization = My.Application.Info.DirectoryPath
        MainMenuService.SetLocalization("it.xml")
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How to switch interface language of DesignerControl by code

Post by Edward »

Ok, your code is correct when "it.xml" is placed in the Application folder.

If "Localization" folder is created in the same directory and "it.xml" is there then simply remove the following command:

Code: Select all

Stimulsoft.Report.StiOptions.Configuration.DirectoryLocalization = My.Application.Info.DirectoryPath
And your code will work.

Thank you.
Post Reply