expressappframework-119411-localization-how-to-localize-xaf-application-items-using-xaf-tools.md
This topic describes how to localize typical XAF application items using XAF tools. We recommend reviewing the Application Model Basics and Localization Basics topics before proceeding.
Refer to the How to: Localize an XAF Application topic for information on how to translate XAF applications.
You can localize parts of an XAF application in two ways:
We recommend using the Localization Tool to speed up the localization process.
Start the translation in the platform-agnostic module (MySolution.Module) and then proceed to the platform-specific modules. Follow the steps below to localize each XAF application module with the Localization Tool.
Click the Localization button in the Model Editor Toolbar to invoke the XAF Localization window.
In the Localization window toolbar, select the target language in the Translation Language drop-down list.
Apply the Untranslated non-calculated filter using the Filters action.
Translate all the values in the Translated Value column. Move focus to the next row pressing the ENTER key. If there are several properties with the same Default Language value, the Multiple Values Translation dialog is invoked. If you click Yes , the tool translates all these values at once and focuses the next value to be translated.
When you have finished the translation, click Save or press CTRL+S to save changes to the Application Model. The translated properties are hidden due to the Untranslated… filter, and the Is Translated checkbox is checked after saving.
Next, apply the Calculated filter to review the calculated values.
After closing the Localization window, you can see the localized values in the Model Editor. Save the changes in the Model Editor.
A typical XAF application has platform-specific authentication, security strategy and module versions. For example, Windows Forms applications can have the SchedulerWindowsFormsModule module. This module extends the Application Model with localizable properties that are not available at the module level. You can have platform-specific Controllers that provide strings that need to be localized (action captions, tooltips, exceptions, and so on.).
Follow the steps below to localize the main parts of your XAF application directly in the Model Editor. Note that some translation values contain properties’ names ( ObjectCaptionFormat , DisplayFormat , etc.) and should not be localized.
Note
If you do not use the Active Directory authentication, the Log On window (web page) UI elements localization requires particular attention. The Log On and Cancel buttons are Actions. These Actions have Logon and DialogCancel IDs and are localizable in the ActionDesign | Actions node.
Expand the ActionDesign | DisableReasons node and set localized values to its child nodes’ Caption properties.
Expand the BOModel node and assign localized values to its child nodes’ Caption properties. You can skip nodes of classes that are not represented in the application UI (for example, the XPBaseObject node). Note that localizing ObjectCaptionFormat properties may also be required. The Caption properties of CreatableItems , NavigationItems and Views child nodes are automatically localized as they expose values from class captions by default.
Expand the Localization node and set localized values to its child nodes’ Value properties. The Exceptions | UserVisibleExceptions child node localization requires particular attention. You can skip the Exceptions | SystemExceptions node, as it contains exceptions addressed to developers and administrators, and is invisible to end-users in normal application operation.
Expand the NavigationItems and localize the Default node caption.
If you use the ValidationModule module, expand the Validation node and assign localized values to the child node properties the globe glyph ( ) denotes.
If you do not use the Active Directory authentication type, the Log On window (web page) localization requires particular attention. The AuthenticationStandardLogonParameters Detail View represents this window (web page) content, so navigate to the Views | AuthenticationStandardLogonParameters_DetailView node and set the localized value to its Caption property. Expand the Items child node and localize the LogonText node’s Text property. Localize the UserName and Passwords node captions.
Invoke the Model Editor for the application project (Windows Forms) to see additional platform-specific Localization child nodes. For instance, in the Windows Forms application Model, you should assign localized values to Confirmations , DialogButtons and FrameTemplates child nodes.
Note
If you received the FormatException or MemberNotFoundException , ensure that you have not localized a property name in a localizable value.
Refer to the following topics to learn how to localize particular messages in an application:
The Localize Standard XAF Modules and DevExpress Controls Used in an Application topic describes how to localize built-in XAF Modules and DevExpress controls.