ActiveReports for .NET 3 Online Help Request technical support
Localizing the ActiveReports Engine
See Also
User Guide > Samples and Walkthroughs > Walkthroughs > Standard Edition Walkthroughs > Advanced > Localization Walkthroughs > Localizing the ActiveReports Engine

Glossary Item Box

In ActiveReports, the report engine and associated dialogs can be localized.

This walkthrough illustrates the basics of setting up localized strings for the ActiveReports report engine.

The walkthrough is split up into the following activities:

To complete the walkthrough, you must have the following files, which are located in your Program Files/Data Dynamics/ActiveReports for .NET 3.0/ Localization folder.

The .resx and .txt files are located within the AREngine.zip file.

When you have finished this walkthrough, you will have a localized ActiveReports parameters dialog that looks similar to the following. For purposes of this image, Japanese was used to localize the report engine.

Creating a new Visual Studio project

To create a new Visual Studio project

  1. Open Visual Studio.
  2. From the File menu, select New > Project.

  3. Select the project type and click on Windows Application.
  4. Change the name of your project and click OK.

Creating a Directory

To create a directory

  1. Open Windows Explorer and browse to the folder in which your project's EXE file will be contained when the report is run. For Visual Basic .NET, this will be the bin folder. For C#, this will be the bin/Debug folder.
  2. From the File menu, select New > Folder.
  3. Name the folder according to the CultureInfo that you will use to localize your project. For example, you would use "ja" for Japanese.
  4. Copy the following files from the Program Files/Data Dynamics/ActiveReports for .NET 3.0/Localization folder into the new CultureInfo folder: 
    • LocalizeAREngine.bat
    • publickey.snk
  5. Add a new folder to the CultureInfo folder and name it "AREngine."
  6. Navigate to the Program Files/Data Dynamics/ActiveReports for .NET 3.0/Localization folder and locate AREngine.zip. This file contains the the .resx and .txt files necessary to localize the Engine.
  7. Extract the contents of AREngine.zip to the AREngine folder you created. The AREngine folder should contain the following:
    • A General folder, which contains the file "ParamPromptDialog.resx" 
    • A Resources folder, which contains the files "Descriptions.txt" and "Strings.txt"

Localizing the Resource and Text Files

To localize the resource and text files 

  1. Open a Visual Studio .NET 2003 or 2005 command prompt. 
  2. Run the Windows Resource Localization Editor by typing "winres" and hitting Enter. This editor allows you to edit dialog .resx files for a certain locale. The utility is included as part of the .NET framework.
  3. From the menu bar of the Localization Editor, select File > Open.
  4. Change the file type to "ResX File(*.resx)".
  5. Navigate to the directory that you created and copied the required files into, choose the ParamPromptDialog.resx file and click Open to open the file in the Editor.
  6. Make any necessary changes, then from the menu bar click File > Save. Select your localization culture from the list and press OK.
  7. Close the Windows Resource Localization Editor.
  8. Close the Visual Studio .NET 2003 or 2005 command prompt window.
  9. In Windows Explorer, browse to the folder in your project that contains the files, Strings.txt and Descriptions.txt. Edit each file for the language you have chosen to localize. Below is an image of part of the "Strings.txt" file used for this project. 

Compiling the ActiveReports3.resources.dll using the LocalizeAREngine.bat file

To compile the ActiveReports3.resources.dll

  1. Right-click on the LocalizeViewer.bat file and select Edit. The file will open in your default text editor.
  2. Set the value of CULTURE to the CultureInfo you are using.
  3. Add the CultureInfo extension to the ParamPromptDialog.resx file to ensure that the localized .resx file you edited is used when the resources assembly is compiled. The following image highlights the changes that must be made.

    If you are using Visual Studio 2005, you will need to change the call command to "C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat".
  4. Double-click on LocalizeAREngine.bat to run the batch file and compile the resources DLL to your localization folder. From the command window, you should see each resource file written and a verification entry for the ActiveReports3.resources assembly. This indicates success and the ActiveReports3.resources.dll is added to your localized folder. 

Adding an ActiveReport with Parameters

To add the ActiveReport with Parameters

  1. In your project, from the Project menu, select Add New Item.
  2. Select ActiveReports 3.0 File and rename the file rptParams.
  3. Follow the instructions in the Parameters with Simple Reports walkthrough to create your report with parameters.

Adding Code to Change the Culture Information (Optional Step)

Note: This step is only necessary if you are developing on a machine with culture information different from that in the project you are localizing.

To add code to change the culture information

Running the Project

To run the project

Prior to deploying the project, you can send the ActiveReports.Design3.resources.dll file to ActiveReports.Support@DataDynamics.com to have it signed. Once Data Dynamics has signed the DLL, you will need to use sn -Vu "ActiveReports.Design3.resources.dll." When you deploy the project, if your other DLLs are being sent to the Global Assembly Cache, this file will also need to be sent there.

See Also

©2009. All Rights Reserved.