How to: Localize an XAF Application
This topic describes how to localize an XAF application. We recommend reviewing the Application Model Basics and Localization Basics topics before proceeding.
- To localize a Mobile application, add the Localization Mobile Module to your Mobile-oriented project.
Choose a language you want to use in your XAF applications.
One of the pre-installed languages: German (de), Spanish (es), Japanese (ja) and Russian (ru). Note that Spanish (es) is not provided for Mobile applications by default.
Satellite assemblies and localization dictionaries are reusable in any other project.
Remember to deploy the required satellite assemblies when deploying an XAF application. Refer to the Deployment Tutorial for more details.
In the module project, double-click the Model.DesignedDiffs.xafml file to invoke the Model Editor. Focus the root node and click Languages Manager... in the Language combo box on the Model Editor Toolbar. Add the target language in the invoked dialog and click OK. Restart Visual Studio to load localized values from the satellite assemblies and specify the application's target language in the Language combo box.
Refer to the Localization Basics topic for more information.
- To add a new or modify an existing translation value, use one of the tools described in the How to: Localize XAF Application Items Using XAF Tools topic.
- To specify an application's language, invoke the Model Editor for an application project, navigate to the Application node and set the IModelApplication.PreferredLanguage property to the required language. Refer to the Localization Basics topic for more details. If you want your application's language to match the language on the user's device (or browser language for Mobile applications), set the PreferredLanguage property to (User language).
- Windows Forms Templates' localizable resources are not available in the Application Model by default. Refer to the How to: Localize a WinForms Template to learn how you can localize it.
- The splash screen form displayed on the Windows Forms application startup contains a "Loading" text label. You can specify a different text as described in the How to: Use a Custom Splash Screen topic's Splash Screen Localization section.
- Start the application to ensure that all the text values are localized.