ActiveReports 6 Online Help
Localize the Viewer Control
See Also Send comments on this topic.
ActiveReports 6 > ActiveReports User Guide > How To > Customize, Localize and Deploy > Localize the Viewer Control

Glossary Item Box

To localize the viewer control

  1. In Windows Explorer, navigate to C:\Program Files\GrapeCity\ActiveReports 6\Localization (on a 64-bit Windows operating system, navigate to C:\Program Files (x86)\GrapeCity\ActiveReports 6\Localization).
  2. Edit the Viewer.bat file:
    1. Right-click the Viewer.bat file and select Edit.
    2. Change the culture in the line set Culture="en-Us" to the culture you want to use. For your convenience, here is a list of predefined .NET Cultures.
    3. Ensure that the ProgamFilesDDPath is correct.
      Caution: Do not change the ProjectName, dllName, msDir, or BaseNamespace.
    4. Save and close the Viewer.bat file.
  3. Change strings in the resource files:
    1. Double-click the Viewer.zip file to open it.
    2. Extract all of the files to C:\Program Files\GrapeCity\ActiveReports 6\Localization (on a 64-bit Windows operating system, extract the files to C:\Program Files (x86)\GrapeCity\ActiveReports 6\Localization). A Viewer subfolder is created.
    3. In the new Viewer folder's Res subfolder, open each of the four *.resx files and change the strings as needed.
    4. If you want to change any of the images, rename your localized images to the names of the ones in the Res\Resources subfolder and replace them with your localized images.
  4. Back in the main Localization folder, double-click the Viewer.bat file to run it. The NameCompleter.exe application runs, and creates:
    • A SatelliteAssembly folder inside the Viewer folder.
    • A language subfolder with the same name as the culture you set in the Viewer.bat file inside the SatelliteAssemby folder.
    • A localized ActiveReports.Viewer6.resources.dll file inside the language subfolder.

    Note: The Viewer.bat file copies the language subfolder with the ActiveReports.Viewer6.resource.dll to
    the C:\Program Files\Common Files\GrapeCity\ActiveReports 6\ folder (on a 64-bit Windows operating system, the C:\Program Files (x86)\Common Files\GrapeCity\ActiveReports 6\ folder). If you get a warning message when running the Viewer.bat file, then you should use the administrator permissions for the Viewer.bat file.

    ShowRun the Viewer.bat file as Administrator

    1. From the Start menu, click Run, type cmd in the text box, and then click OK.
    2. Press CTRL + SHIFT + ENTER to open a command prompt in the Administrator mode. Alternatively, you can right-click cmd.exe and select Run as Administrator.
    3. Type cd C:\Program Files\GrapeCity\ActiveReports 6\Localization (on a 64-bit Windows operating system, type cd C:\Program Files (x86)\GrapeCity\ActiveReports 6\Localization) to change the current directory.
    4. Type Viewer.bat to run it.

    ShowLog in as an Administrator

    The Administrator account is disabled by default so you should active it first.

    1. From the Start menu, click Run, type cmd in the text box, and then click OK.
    2. Press CTRL + SHIFT + ENTER to open a command prompt in the Administrator mode.
    3. Type net user Administrator /active:yes to activate the Administrator account.
    4. Log off and log in with the Administrator account.
  5. Copy the language subfolder and paste it into the Debug folder of your application.

Note: If you want to put your localization in the Global Assembly Cache (GAC), you must first send the localized ActiveReports.Viewer6.resources.dll file to GrapeCity and get it signed. Then you can drag the language subfolder with the signed dll file into C:\WINDOWS\ASSEMBLY.

Since the UAC in Vista and Windows7 prevents drag and drop registry to the GAC, we recommend that users of these operating systems run the Gacutil.exe as described on MSDN.

To test your localized application on a machine that does not share the culture of the localized dll

  1. Add the following code in the form's constructor just before the InitializeComponent method is called.
  2. Replace the "ja" in the example code with the culture specified in the Viewer.bat file.

ShowTo write the code in Visual Basic.NET

Visual Basic.NET code. Paste INSIDE the the form's constructor just before the InitializeComponent method. Copy Code
System.Threading.Thread.CurrentThread.CurrentUICulture = New System.Globalization.CultureInfo("ja")

ShowTo write the code in C#

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");

See Also