ActiveReports 6 Online Help
Localize the Silverlight Viewer (Pro Edition)

The Silverlight Viewer, a control available in Visual Studio 2010 Silverlight projects, is localized separately from other ActiveReports resources.

The default locale is en_US, U.S. English, but the installation includes ActiveReports.Silverlight.resources.dll files with strings localized for ja-JP, Japanese, ru-RU, Russian, and zh-CN, Chinese.

To localize the Silverlight Viewer for Japanese, Russian or Chinese with included resources

  1. Copy the required ja-JP, ru-RU or zh-CN folder from C:\Program Files\Common Files\GrapeCity\ActiveReports 6\ja-JP (or ru-RU or zh-CN) into the bin\Debug folder of the Silverlight project that contains the XAML file with the Silverlight Viewer. On a 64-bit Windows operating system, this file is located in C:\Program Files (x86)\Common Files\GrapeCity\ActiveReports 6\ja-JP (or ru-RU or zh-CH).
  2. In the Solution Explorer, right-click the project file that you want to localize, and select Unload Project. This allows you to edit the file. The file name in Solution Explorer is appended with (unavailable).
    Tip: Alternatively, you can edit the csproj or vbproj file in Notepad outside of Visual Studio.
    1. Right-click the project file and select Edit MyProject.
    2. In the SupportedCultures node, add one or more locales that you want to use so that it looks like the following.
      SupportedCultures. Add locales that you want to use.
      Copy Code
      <SupportedCultures>zh-CN,ja-JP,ru-RU</SupportedCultures>
    3. When you have finished, right-click the project file in Solution Explorer, and select Reload Project.
  3. In the MainPage.xaml.vb or .cs file, add code like the following to the MainPage class, changing the CultureInfo to the locale that you want to use.

    To write the code in Visual Basic

    To write the code in C#

  4. Run the project to see the localized Silverlight Viewer.

To create custom localizations

  1. In the Solution Explorer, right-click the project file that you want to localize, and select Unload Project. This allows you to edit the file. The file name in Solution Explorer is appended with (unavailable).
    Tip: Alternatively, you can edit the csproj or vbproj file in Notepad outside of Visual Studio.
    1. Right-click the project file and select Edit MyProject.
    2. In the SupportedCultures node, add one or more locales that you want to use so that it looks like the following.
      SupportedCultures. Add locales that you want to use.
      Copy Code
      <SupportedCultures>zh-CN,ja-JP,ru-RU</SupportedCultures> 
    3. When you have finished, right-click the project file in Solution Explorer, and select Reload Project.
  2. In the MainPage.xaml.vb or .cs file, add code like the following to the MainPage class, changing the CultureInfo to the locale that you want to use.

    To write the code in Visual Basic

    To write the code in C#

  3. In the C:\Program Files\GrapeCity\ActiveReports 6\Localization folder (on a 64-bit Windows operating system, in the C:\Program Files (x86)\GrapeCity\ActiveReports 6\Localization folder), open the SilverlightViewer.zip file.
  4. Using Notepad, open the Resources.resx file and localize the strings contained in the <value> </value> tags.
  5. Save the Resources.resx file.
  6. In the C:\Program Files\GrapeCity\ActiveReports 6\Localization folder (on a 64-bit Windows operating system, in the C:\Program Files (x86)\GrapeCity\ActiveReports 6\Localization folder), edit the SilverlightViewer.bat file:
    1. Right-click the SilverlightViewer.bat file and select Edit.
    2. Change the culture in the line set Culture="ja-JP" to the culture you want to use.
    3. Save and close the SilverlightViewer.bat file.
  7. Back in the main Localization folder, double-click the SilverlightViewer.bat file to run it. The language folder ja-JP will be created in the SilverlightViewer folder.
  8. Email the localized ja-JP.zip file to powersupport@grapecity.com to have the ActiveReports.Silverlight.resources.dll signed.
  9. When you receive the new ActiveReports.Silverlight.resources.dll file, open the ClientBin folder of your Web Application.
  10. In the ClientBin folder of your Web Application, rename the extension of the XAP file from .XAP to .zip and decompress it.
  11. Copy the language folder with the signed ActiveReports.Silverlight.dll into the XAP decompressed folder.
  12. Open the project in Visual Studio.
  13. In Solution Explorer, open the AppManifest.XAML file in the YourProject\Properties folder and add the <AssemblyPart> element to the <Deployment.Parts> </Deployment.Parts> tags as follows (you can modify the culture string to the one you want):
    Paste after <Deployment.Parts> of AppManifest.XAML
    Copy Code
    <AssemblyPart Source="culture/ActiveReports.Silverlight.resources.dll" />
  14. Save the AppManifest.XAML file and compress the XAP folder to the ZIP file.
    Important: We recommend that you do NOT build or rebuild the application after you complete the localization steps; otherwise the XAP file will be changed to the original one.
Note: If you are willing to share your new localization with other customers, let support know so that the updated ActiveReports.Silverlight.resources.dll file can be included in future builds of the product.
See Also

Walkthroughs

Getting Started