9 Translating Custom Text

This chapter describes how to localize the custom text in Oracle Fusion applications that you create using the following runtime tools:
  • Page Composer

  • Oracle Fusion CRM Application Composer (Application Composer)

  • Customize User Interface Text tool

  • Manage Menu Customizations task

  • Manage Descriptive Flexfields task

  • Manage Extensible Flexfields task

  • Manage Value Sets task

This chapter includes the following sections:

9.1 About Translating Custom Text

If your Oracle Fusion Applications are running in different locales, you can localize the custom text such that end users see that text in the language of their locale. End users set their locale when they log in and by choosing Set Preferences from the Personalization group in the Settings and Actions menu.

For customizations that you make using the following tools, use resource bundles to provide locale translations for the custom text as described in About Translating Resource Bundles from an .

  • Page Composer

  • Oracle Fusion CRM Application Composer (Application Composer)

  • Customize User Interface Text tool

  • Manage Menu Customizations task

Note:

You can also use the Customize User Interface Text tool to provide locale translations for the custom text that you create using Page Composer, Application Composer, and Customize User Interface Text. The Customize User Interface Text tool is ideal for translating a small set of custom strings for a few locales. To create translations for a specific locale, log in using that locale and then use Customize User Interface Text to provide the translations.

For flexfield and value set configurations, provide locale translations using the appropriate maintenance tasks, as described in About Translating Flexfield and Value Set Configurations.

9.2 About Translating Resource Bundles from an Oracle Metadata Services Repository

Most user interface text is made available to applications through resource bundles. A resource bundle is a collection of locale-specific objects. When a program needs a locale-specific resource, a String for example, it can load the resource from the resource bundle appropriate for the current user's locale. In this way, the program code is largely independent of the user's locale, isolating most, if not all, of the locale-specific information in resource bundles.

Use the Oracle WebLogic Scripting Tool (WLST) exportMetadata command to obtain XLIFF documents and use the WLST importMetadata command to import XLIFF documents into an MDS repository.

Tip:

You can also use Oracle Enterprise Manager Fusion Applications Control to import and export the XLIFF documents from an MDS repository. For more information, see the "Transferring Metadata Using Fusion Middleware Control" section in the Administering Oracle Fusion Middleware. The referenced procedure describes using Fusion Middleware Control, but also applies to Fusion Applications Control.

For specific information about localizing Page Composer, Application Composer, and Customize User Interface Text customizations, see About Translating _ _ and Customize User Interface Text Tool Customizations. For specific information about localizing navigator and home page menu customizations, see About Translating Menu Customizations.

Related Links

The following documents provide additional information related to subjects discussed in this section:

  • For information about naming and editing XLIFF documents, see the "Manually Defining Resource Bundles and Locales" section in the Developing Web User Interfaces with Oracle ADF Faces

  • For information about MDS Repository and the exportMetadata and importMetadata commands, see the "Managing the Metadata Repository" chapter in the Administering Oracle Fusion Middleware

  • For information about using Fusion Middleware Control to import and export XLIFF documents, see the "Transferring Metadata Using Fusion Middleware Control" section in the Administering Oracle Fusion Middleware. The referenced procedure describes using Fusion Middleware Control, but also applies to Fusion Applications Control

9.2.1 Defining Translations for the Custom Text in an MDS Repository

Define translations for custom text by exporting XLIFF documents from an MDS repository, editing the documents to include the translated text, and importing the revised documents into the repository.

To localize the custom text:

  1. Use the WLST exportMetadata command shown in Example 9-1 to export XLIFF documents from the MDS repository to a directory of your choice.

    Set the docs attribute to the class path for the XLIFF file. For example, use /oracle/apps/resourcebundles/xliffBundle/FusionAppsOverrideBundle.xlf for the base file for Page Composer and Application Composer custom text. Use /oracle/apps/menu/CustResourceBundle.xlf for the base file for menu custom text. Use the following format for the names of locale documents:

    basename_language[_country].xlf
    

    Replace language with the ISO 639 lowercase language code, such as fr for France. When applicable, replace country with the ISO 3166 uppercase country code. Country codes are necessary when one language is used by more than one country. For example, use CustResourceBundle_zh_CN.xlf for custom translations for Chinese in the People's Republic of China.

    Because all Oracle Fusion applications use the same repository partition, you can use any Oracle Fusion application as an argument for the application attribute when you export an XIFF file for text customizations.

  2. Synchronize the entries in the XLIFF documents and provide the translated text in the <target> tags, as shown in Example 9-2.
  3. Use the WLST importMetadata command shown in Example 9-2 to import the modified documents into the MDS repository.

    Because all Oracle Fusion applications use the same repository partition, you can use any Oracle Fusion application as an argument for the application attribute when you import an XIFF file for text customizations.

Example 9-1 WLST exportMetadata Command

exportMetadata(application='application', server='server', 
toLocation='directory-path', 
docs='xlf-classpath', applicationVersion='version')

Example 9-2 Sample Translation

<trans-unit id="ACCOUNTING_DISTRIBUTION">
  <source>Accounting Distribution</source>
  <target>Ventilation comptable</target>
  <note>Accounting Distribution</note>
</trans-unit>

Example 9-3 WLST importMetadata Command

importMetadata(application='application', server='server', 
fromLocation='directory-path', 
docs='xlf-classpath', applicationVersion='version')

9.3 About Translating Page Composer, Application Composer, and Customize User Interface Text Tool Customizations

All text that is customized using Page Composer, Application Composer, and the User Interface Text page is stored in the customizations XLIFF document for the locale of the session in which you made the customizations. After you customize a page using these tools, you might want to define translations for the custom text in the base customizations file as well as the customizations files for the other supported locales. For example, you might want to define French and Chinese translations of new prompts.

Caution:

Do not translate lookup type or lookup code values in resource bundle XLIFF translation files.

As shown in the following figure, when an end user accesses the customized objects, the application loads the translated custom text for the locale's language and, if applicable, country. If the user's locale is for a language in a specific country and customized text is not available for that locale, the application loads the text for the locale's language. If no translated text is found, the application loads the text from the base customizations document.

Figure 9-1 Process for Retrieving Translated Text

Process for retrieving translated text

Note that the previous figure does not show a No path for the condition where the translation is not found in the base XLIFF document. If no entries exist in the locale and base documents, the text that is displayed varies. For example, for a field label, the application displays the attribute name. In other cases, no text is displayed.

To define translations for custom text, follow the steps in Defining Translations for the Custom Text in an . Export the base document /oracle/apps/resourcebundles/xliffBundle/FusionAppsOverrideBundle.xlf and the documents for all the locales for which you want to define translations. The locale XLIFF documents are named /oracle/apps/resourcebundles/xliffBundle/FusionAppsOverrideBundle_language[_country].xlf. Replace language with the ISO 639 lowercase language code, such as fr for France. When applicable, replace country with the ISO 3166 uppercase country code. Country codes are necessary when one language is used by more than one country. For example, use /oracle/apps/resourcebundles/xliffBundle/FusionAppsOverrideBundle_zh_CN.xlf for custom translations for Chinese in the People's Republic of China.

Note:

The base document /oracle/apps/resourcebundles/xliffBundle/FusionAppsOverrideBundle.xlf is automatically generated the first time that a string is inserted or customized using Page Composer, Application Composer, or the Customize User Interface Text tool. Ensure that the bundle exists by inserting or customizing at least one string.

Copy the new and changed entries from the document for the locale with which you made the customizations into the base document and into the other locale documents. Provide the translations and import the modified documents into the MDS repository.

9.4 About Translating Menu Customizations

All navigator and home page menu customizations are stored in the /oracle/apps/menu/CustResourceBundle.xlf base XLIFF document as well as the XLIFF document for your locale setting when you customized the menu. After you customize the menu, you might want to define translations for your changes in the locales that you support, including the locale for the session in which you entered the custom text. For example, you might want to define French and Chinese translations of new menu items.

The process for retrieving translated text is the same as shown in Figure 9-1, with the exception that if no entries exist in the locale and base documents, no text is displayed.

To create locale translations for your menu changes, follow the steps in Defining Translations for the Custom Text in an . Export the base document /oracle/apps/menu/CustResourceBundle.xlf and export the documents for all the locales for which you want to define translations. The locale XLIFF documents are named /oracle/apps/menu/CustResourceBundle_language[_country].xlf. Replace language with the ISO 639 lowercase language code, such as fr for France. When applicable, replace country with the ISO 3166 uppercase country code. Country codes are necessary when one language is used by more than one country. For example, use /oracle/apps/menu/CustResourceBundle_zh_CN.xlf for custom translations for Chinese in the People's Republic of China.

Copy the new and changed entries from the base document into the locale documents and provide the translations. Then import the modified locale documents into the MDS repository.

9.5 About Translating Flexfield and Value Set Configurations

You can find more information about translating flexfield and value set configurations in the Implementing Common Features guides.

For information about implementing your specific product family, do the following: