Search This Blog

Tuesday, July 8, 2025

How Do I get a Deep Understanding Of the Translation Process in Oracle APEX

 

Introduction
Gaining a deep understanding of the translation process in Oracle APEX is essential for developers aiming to build truly global applications. The translation process involves more than just converting text from one language to another—it encompasses managing language metadata, exporting and importing translation files, handling multibyte characters, and ensuring that dynamic content adapts seamlessly across languages. Mastering this process helps you deliver polished, user-friendly applications that resonate with diverse audiences.

To gain a deep understanding of the translation process in Oracle APEX, it is important to familiarize yourself with how APEX manages multilingual content and the tools it provides for exporting, translating, and importing application text. The translation process in APEX is centered around language metadata, text repositories, and standardized translation files (XLIFF).

Step 1: Understand Application Text Sources

Oracle APEX stores all user interface text, such as page titles, region headings, button labels, messages, and validation errors, within the application metadata. This text is the source content that will be translated. Additionally, developers can define Text Messages—key-value pairs for dynamic or reusable content that can also be localized.

Step 2: Learn About Language Codes and Globalization

Each language in APEX is identified by a language code (e.g., en for English, fr for French, zh-cn for Simplified Chinese). The Primary Language is the base language for your application, while additional languages are defined for translation targets. Understanding how these codes work and how they relate to session language settings is key to managing translations effectively.

Step 3: Use the Translate Application Feature

Within Shared Components, the Translate Application wizard is your primary tool for managing translations. Here you can:

  • Export XLIFF Files: Export all translatable text into an XLIFF file, a standardized XML format widely used in localization. This file contains all strings from the application for a specific language, including labels, messages, and prompts.

  • Import Translated XLIFF Files: After translation, import the XLIFF file back into APEX. The system updates the application metadata to include the translated text for the target language.

Step 4: Work with XLIFF Files

XLIFF files are the heart of the translation process. They include source strings (in the primary language) and target strings (translated text). To gain expertise:

  • Open XLIFF files in an XML editor or a specialized translation tool that supports XLIFF and Unicode.

  • Ensure that translations maintain the structure of the file to avoid import errors.

  • Handle multibyte characters carefully by saving files in UTF-8 encoding.

  • Review placeholders or substitution strings (e.g., #APP_NAME#) and preserve them in translations.

Step 5: Manage Text Messages and Dynamic Content

Besides static UI elements, dynamic text or reusable messages are stored in Shared Components > Text Messages. These messages also participate in the translation process and can be localized by exporting and importing translations. Use the APEX_LANG.MESSAGE API to reference translated messages programmatically.

Step 6: Test Language Switching and Fallback

Set up session language switching to test how your application behaves in different languages. Understand the fallback mechanisms Oracle APEX uses when a translation is missing—usually, it falls back to the primary language. Testing ensures your translations load correctly and that the UI adjusts accordingly.

Step 7: Explore Advanced Translation Management

For complex applications, consider:

  • Automating translation exports and imports using APEX APIs or command-line tools.

  • Integrating third-party translation services for machine-assisted translations.

  • Using Application Items or Substitution Strings to dynamically control language settings.

By mastering these components—application text, language codes, XLIFF files, text messages, and language switching—you gain a comprehensive understanding of how Oracle APEX handles translations. This knowledge allows you to efficiently localize applications, maintain consistency, and deliver a polished experience to users worldwide.

Oracle APEX provides built-in functionality for translating applications into multiple languages. The translation process involves defining the primary and target languages, extracting text strings, translating them, and applying the translations to create a multilingual application. This tutorial explains the full translation process step by step.


Step 1: Defining the Primary and Target Languages

Before translating an application, define the primary and target languages.

  1. Open Oracle APEX and navigate to your application.

  2. Go to Shared Components > Globalization > Translate Application.

  3. Click Create to add a new translation mapping.

  4. Select the Primary Language (the original language of your application).

  5. Select the Target Language (the language to which you want to translate).

  6. Click Create Language Mapping to establish the translation mapping.

Each target language creates a translated copy of the application, which users will see based on their language preferences.


Step 2: Seeding the Translation Repository

Seeding is the process of extracting text from the application and storing it in the Translation Repository. This includes all user-visible text, such as button labels, region titles, and report headers.

  1. Go to Shared Components > Globalization > Translate Application.

  2. Select Seed Translations.

  3. Choose the application and target language.

  4. Click Seed Translations to extract all text elements from the application into the translation repository.

Once seeding is complete, the text is available for export and translation.


Step 3: Exporting the Translation File

The next step is to export the text into an XLIFF (XML Localization Interchange File Format) file, which can be edited for translation.

  1. Go to Shared Components > Globalization > Translate Application.

  2. Click Export XLIFF File.

  3. Choose the Target Language and click Export.

  4. Save the downloaded XLIFF file to your local computer.

This file contains all the application text elements in XML format, allowing translators to provide the necessary translations.


Step 4: Translating the XLIFF File

The XLIFF file contains key-value pairs, where each text string in the primary language needs a corresponding translation.

  1. Open the XLIFF file in a text editor or translation tool.

  2. Locate sections like: 

  3. <trans-unit id="REPORT_TITLE">

  4.     <source>Sales Report</source>

  5.     <target>Informe de Ventas</target>

  6. </trans-unit>

  7. Enter the translated text in the <target> tags for each section.

  8. Save the file after all translations are complete.

For professional translation, the XLIFF file can be sent to a translation service or imported into translation management software.


Step 5: Importing the Translated XLIFF File

Once the translations are ready, import the XLIFF file back into APEX.

  1. Go to Shared Components > Globalization > Translate Application.

  2. Click Apply XLIFF Document.

  3. Select the target language and upload the translated XLIFF file.

  4. Click Apply to store the translations in the application.

This updates the translation repository with the translated text.


Step 6: Publishing the Translated Application

After applying translations, the final step is to publish the translated version of the application.

  1. Go to Shared Components > Globalization > Translate Application.

  2. Click Publish Application.

  3. Choose the target language and confirm the publishing process.

  4. A new translated version of the application is now available.

Users will see the application in their preferred language if their browser or session language matches a translated language version.


Step 7: Testing the Translated Application

After publishing the translation, test the application to ensure all text appears correctly in the target language.

  1. Set your session language to the target language.

  2. Navigate through the application and check if all labels, buttons, and messages are translated.

  3. Look for any untranslated strings and update them in the translation repository.

If necessary, repeat the export, translation, and import process to refine the translation.


Best Practices for Translating Applications in APEX

  • Choose AL32UTF8 as the database character set to support all languages.

  • Regularly seed translations to ensure new UI elements are captured for translation.

  • Maintain a consistent glossary of terms to ensure uniform translations across different pages.

  • Use substitution strings (&STRING_NAME.) for reusable text elements to simplify translation.

  • Ensure right-to-left (RTL) support if translating into languages such as Arabic or Hebrew.

  • Test different locale and formatting settings to verify date, number, and currency formats.

By following these steps, you can efficiently translate and manage a multilingual Oracle APEX application.

Conclusion
A thorough grasp of Oracle APEX’s translation process empowers developers to efficiently manage multilingual content and maintain consistency throughout their applications. By understanding the roles of XLIFF files, language codes, and translation repositories, and by following best practices for exporting, translating, and importing, you can streamline localization efforts and provide an exceptional user experience worldwide.

No comments:

Post a Comment

HOW DO I SET A HOME PAGE

 Setting a home page in Oracle APEX is an essential step in defining the default landing page for your application. The home page serves as ...