ActiveReports 8 > ActiveReports User Guide > Concepts > Localization |
ActiveReports uses the Hub and Spoke model for localizing resources. The hub is the main executing assembly and the spokes are the satellite DLLs that contain localized resources for the application.
For example, if you want to localize the Viewer Control, the hub is GrapeCity.ActiveReports.Viewer.Win.v8.dll and the spoke is GrapeCity.ActiveReports.Viewer.Win.v8.resources.dll.
In your Program Files folder, the Localization folder is in a path like ....\ComponentOne\ActiveReports 8\Localization, and contains all of the ActiveReports components that you can localize.
There are 16 ActiveReports components in the Localization folder and most have two files.
There is one application in the Localization folder: NameCompleter.exe. When you run your .bat file after updating your culture, it runs this application to create a SatelliteAssembly folder with a language sub-folder containing the localized GrapeCity.ActiveReports.AssemblyName.v8.resources.dll file.
Place the language folder containing the *.resources.dll file inside your main executing assembly folder to implement changes.
Note: Before you can distribute or put your localization in the Global Assembly Cache (GAC), you must first send the localized GrapeCity.ActiveReports.AssemblyName.v8.resources.dll file to ComponentOne support and get it signed with a strong name. Once you receive the signed DLL file, you can drag the language subfolder with the signed DLL file into C:\WINDOWS\ASSEMBLY, or distribute it with your solution. |
When the main executing assembly needs a resource, it uses a ResourceManager object to load the required resource. The ResourceManager uses the thread's CurrentUICulture property.
The common language runtime sets the CurrentUICulture property or you can set it in code to force a certain UI Culture so that you can test whether your satellite DLL is loading properly. The ResourceManager class uses the CurrentUICulture property to locate subdirectories that contain a satellite DLL for the current culture. If no subdirectory exists, the ResourceManager uses the resource that is embedded in the assembly. US English ("en-US") is the default culture for ActiveReports.
Tip: For more detailed information about how the Framework locates satellite DLLs, please refer to the help system in Visual Studio® or the book Developing International Software, 2nd edition by MS Press that contains information on localizing applications using the .NET Framework. |