Translate your Oracle APEX application - step by step

"Translate this APEX application from English to Polish"

That was one of the "make it for yesterday" tasks, so I had little time to read the documentation.

So here's a step-by-step guide I wrote to speed things up. The steps are the same for many other languages. It will help you translate your APEX application quickly and easily.

This guide will cover:

  • translating APEX internal messages and common components to many popular languages,

  • translating application items - labels, button names, region names, etc.

  • allowing users to change session language according to their choice

Languages built-in Oracle APEX (23.2)

According to Oracle documentation, "The APEX runtime engine, which is used by developers to create applications, is available in the following languages: Arabic, Brazilian Portuguese, Croatian, Czech, Danish, Dutch, Finnish, French, French - Canada, German, Greek, Hebrew, Hungarian, Icelandic, Italian, Japanese, Korean, Norwegian, Polish, Portuguese (Portugal) (pt), Romanian, Russian, Serbian - Cyrillic, Serbian - Latin, Simplified Chinese, Slovak, Slovenian, Spanish, Swedish, Thai, Traditional Chinese, and Turkish."

If you installed your APEX instance from a multilanguage version, you already have those languages (or if you use OCI or APEX Service).

If you don't have those languages, read how to install them here.

For other languages, you should provide your own translations—to make it easy, check out the fantastic Translate APEX project made by my colleagues from Pretius.

Translate to Polish (or other language)

I have application 117, with the primary language English.

APEX's common components and internal text messages are in English.

I want it to be in Polish.

My APEX 23.2 is hosted in my OCI, so the Polish language is there - we need to reveal it :)

Step 1: Add Polish translation (or other language you want)

Go to Shared Components - Globalization - Application Translations

There are no translations for my application yet:

Click "Define application languages"

Click "Create"

Pick the language "Polish" and choose a unique app ID.

This application (1117 in my case) will be used only to store translated values - there won't be direct access to this application (you won't see this app in apex builder, and you don't need it)

Add as many language translations as you need.

Step 2: Allow users to change application session language

I've created a new modal page and added it to the Navigation Bar (it's ugly, but it works, and that's not the case in this blog :) )

Page 100 is a modal page that allows for the changing of session language.

Query for P100_SESSION_LANG item:

select language as d, language as r
  from (
          select application_primary_language as language
            from apex_applications
           where application_id = :APP_ID
          union
          select translated_app_language as language
            from apex_application_trans_map
           where primary_application_id = :APP_ID
       );

APEX_UTIL.GET_SESSION_LANG

Execute server-side code whenever the session language is changed.

BEGIN
    APEX_UTIL.SET_SESSION_LANG( P_LANG => :P100_SESSION_LANG);
END;

Step 3: Seed translatable text

Go to Shared Components - Application translations - Seed translatable text

Select your translated app and click "Seed".

It can take a while.

Step 4: Publish an application

Go to Shared Components - Application translations - Publish translated applications

Select the translated app and click "Publish"

Step 5: Set Globalization settings

Go to Shared Components - User interface - Globalization

Set the value of Application Language Derived From parameter to "Session"

Will Oracle APEX translate everything automatically?

Not exactly.

APEX Internal text messages

If I change the language of my application session to Polish, the Actions menu below will be changed to Polish.

As well as existing Interactive Grid actions:

And many other parts of the application.

What about button names, regions, etc.?

Those components need to be translated by you.

For example: "Cancel", "delete", and "save" buttons on page 49 are still in English (even though my session language is Polish)

How to translate it?

  • Go to Shared Components - Application translations - Translation repository

  • Search for your language, page and components

    Change "Translate to value" for your language".

    The button "Save" will be "Zapisz" in Polish.

Remember to Seed and publish your application after every change. Otherwise, you won't see the changes you have made.

It applies to any changes, even if you add a new page item, page region, etc.

Of course, If your app is big, you don't have to translate it all manually.

You can download the XLIFF translation files as a file and use, e.g. Chat GPT, to translate all text inside this file to the selected language.

Just translate all words between <source> </source> and put their translated versions into <target> </target>

When your file is ready, upload it:

I hope you enjoyed this blog and it will help you with your application translations.

Rafal

PS: Many thanks goes to Jakub Dobruchowski from Pretius for giving me core knowledge about translations without the need to read docs :) Here's his blog