ActiveReports for .NET 3 Online Help Request technical support
Localizing the ActiveReports Designer
See Also
User Guide > Samples and Walkthroughs > Walkthroughs > Professional Edition Walkthroughs > Pro Edition Localization Walkthroughs > Localizing the ActiveReports Designer

Glossary Item Box

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

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

The walkthrough is split up into the following activities:

To complete the walkthrough, you must have the following files:

  • DataSourceDialog.resx
  • DDColorDropDown.resx
  • DDColorPopup.resx
  • DDColorWell.resx
  • DeletePrompt.resx
  • Descriptions.txt
  • ErrorDialog.resx
  • ExportPopUp.resx
  • FindReplace.resx
  • FormatBorderDialog.resx
  • GridSettingsSheet.resx
  • NewStyleDialog.resx
  • OutputFormatDialog.resx
  • PageSettingSheet.resx
  • PrinterSettingsSheet.resx
  • ReportSettingsDlg.resx
  • ReOrderDialog.resx
  • RichEditInsertFieldDlg.resx
  • ScriptEditor.resx
  • Strings.txt
  • StyleSettingsSheet.resx
  • LocalizeARDesigner.bat
  • publickey.snk
  • UnboundDataSource.rtf

 

You can find these files in your Program Files/Data Dynamics/ActiveReports for .NET 3.0/Localization folder.

The .resx, .txt, and .rtf files are located within the ARDesigner.zip file.

This walkthrough should be completed in conjunction with the Localizing the ActiveReports Report Engine walkthrough.

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

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: 
    • LocalizeARDesigner.bat
    • publickey.snk
  5. Add a new folder to the CultureInfo folder and name it "ARDesigner."
  6. Navigate to the Program Files/Data Dynamics/ActiveReports for .NET 3.0/Localization folder and locate ARDesigner.zip. This file contains the the .resx and .txt files necessary to localize the Designer.
  7. Extract the contents of ARDesigner.zip to the ARDesigner folder you created. The ARDesigner folder should contain the following:
      The Designer folder contains several subfolders. Navigate through each to reach OutputFormatDialog.resx.
    • A Dialogs folder, which contains the following files:
      • DataSourceDialog.resx
      • DDColorDropDown.resx
      • DDColorPopup.resx
      • DDColorWell.resx
      • ErrorDialog.resx
      • ExportPopUp.resx
      • FormatBorderDialog.resx
      • GridSettingsSheet.resx
      • NewStyleDialog.resx
      • PageSettingSheet.resx
      • PrinterSettingsSheet.resx
      • ReOrderDialog.resx
      • ReportSettingsDlg.resx
      • RichEditInsertFieldDlg.resx
      • StyleSettingsSheet.resx

    • A Resources folder, which contains the files, "Descriptions.txt," "Strings.txt," and "UnboundDataSource.rtf"
    • A ReportExplorer folder, which contains the file, "DeletePrompt.resx"
      The SyntaxBox folder contains several subfolders. Navigate through each to reach FindReplace.resx.

    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 OutputFormatDialog.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. Repeat Steps 3-6 for the rest of the .resx files in the directory you created.
    8. Close the Windows Resource Localization Editor.
    9. Close the Visual Studio .NET command prompt window.
    10. In Windows Explorer, browse to the folder in your project that contains the files, Strings.txt, Descriptions.txt, and UnboundDataSource.rtf. 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.

      If any .resx files contain combo box items then the .resx files need to be modified after they are saved.

    Compiling the ActiveReports.Design3.resources.dll using the LocalizeARDesigner.bat file

    To compile the ActiveReportsDesign3.resources.dll

    1. Right-click on the LocalizeARDesigner.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 each .resx file to ensure that the localized .resx files you edited are used when the resources assembly is compiled. The following image highlights the type of 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 LocalizeARDesigner.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 ActiveReports.Design3.resources assembly. This indicates success and the ActiveReports.Design3.resources.dll is added to your localized folder. 

    Adding the ActiveReports Designer control

    To add the designer control

    1. Drag the ActiveReports Designer control from the appropriate toolbox onto the Windows Form.
    2. Set the Dock property for the Designer to Fill.

    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

    1. Press F5 to run the application.
      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.