The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.

How to: Localize an XAF Application

  • 3 min to read

This topic describes how to localize an XAF application. We recommend reviewing the Application Model Basics and Localization Basics topics before proceeding.

  1. 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).

    Other languages:

    Satellite assemblies are reusable in any other project.

    Note

    Remember to deploy the required satellite assemblies when deploying an XAF application. Refer to the Deployment Tutorial for more details.

  2. 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.

    Tutorial_UIC_Lesson11_0_1

    Refer to the Localization Basics topic for more information.

  3. 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.
  4. 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).
  5. 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.
  6. 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 Localize a Splash Form topic.
  7. Start the application to ensure that all the text values are localized.
See Also