You can localize all of the UI strings, error messages, and images that appear in ActiveReports in included resource files, and alter and run a batch file to localize each resource.
To localize ActiveReports Resources
All of the localization files are located in C:\Program Files (x86)\ComponentOne\ActiveReports Developer 7\Localization.
Specify the culture you want to use in the batch files.
- Start Notepad or another text editor as an Administrator.
- Open *.bat file for each resource you want to localize and change the Culture value to the culture you want to use.
- Ensure that the path in ProgamFilesAssemblyDir is correct for your installation, but do not alter any of the other properties.
- Save and close each file.
Localize strings (and images) in the resource files.
- Launch your zip program as an Administrator and open the *.zip file for each resource you want to localize.
- Extract all of the files to
C:\Program Files (x86)\ComponentOne\ActiveReports Developer 7\Localization.
A resource subfolder with the same name as the zip file is created. - In the new folder, open each subfolder and change the strings in each of the *.resx files.
Tip: Strings are located between <value> and </value> tags in the resource files. - If you want to change the images, rename your localized images to the names of the ones in the Res\Resources subfolder and replace them with your localized images.
Run the batch files as an Administrator.
- From the Start menu, type cmd in the text box, and press CTRL + SHIFT + ENTER to open a command prompt as an Administrator.
- To change directories, type:
cd C:\Program Files (x86)\ComponentOne\ActiveReports Developer 7\Localization
and press Enter. - Type the name of the *.bat file and press Enter to run the file. The NameCompleter.exe application runs, and creates the following.
- A SatelliteAssembly folder inside the resource subfolder.
- A language subfolder with the name of the culture you set inside the SatelliteAssemby folder.
- A localized GrapeCity.ActiveReports.AssemblyName.v7.resources.dll file inside the language subfolder.
- Copy the language subfolder and paste it into the Debug folder of your application.
Note: Before you can distribute or put your localization in the Global Assembly Cache (GAC), you must first send the localized GrapeCity.ActiveReports.AssemblyName.v7.resources.dll file to ComponentOne and get it signed with a strong name. Then you can drag the language subfolder with the signed dll file into C:\WINDOWS\ASSEMBLY, or distribute it with your solution.
Test your localized application on a machine that does not share the culture of the localized DLLs.
- Add the following code in the form's constructor just before the InitializeComponent method is called.
- Replace the "ja" in the example code with the culture you specified in the *.bat file.
To write the code in Visual Basic.NET
Visual Basic.NET code. Paste INSIDE the form's constructor just before the InitializeComponent method. | Copy Code |
---|---|
System.Threading.Thread.CurrentThread.CurrentUICulture = New System.Globalization.CultureInfo("ja") |
C# code. Paste INSIDE the form's constructor just before the InitializeComponent method. | Copy Code |
---|---|
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("ja"); |