This tutorial shows how to translate an application developed in Application Builder using Oracle Application Express 5.1.
In this tutorial, you use Oracle Application Express Release 5.1 to translate an application developed in Application Builder. To translate an application developed in Application Builder, you must map the primary and target language, seed and export text to a translation file, translate the text, apply the translation file, and publish the translated application. In this tutorial, you will import an application that is developed in Application Builder using English as the Primary Language. You will then perform some steps to translate this application to German.
Logging into Oracle Application Express in a Oracle Database Cloud Service: Reference the Oracle Help Center for your Oracle Database Cloud Service. To do this, go to the Oracle Help Center for Cloud, and select Platform or Infrastructure (depending on your service). From here, select your Database Cloud Service and the Get Started page will appear.
Visit Oracle Help Center for Cloud.
In this topic, you will first import a pre-built Order Management application into Application Builder. This application is currently using English as its Primary Language. You will later translate this application into German.
From the Oracle Application Express home page, click the down arrow next to the App Builder tab and select Import.
Click the Browse button. Browse to your working directory (the folder where you downloaded and unzipped files.zip), locate Order Management.sql, and click Open.
Enter your Oracle Application Express credentials, and click Login.
The Order Management application is launched displaying the Home page. Notice that this application uses English as its Primary Language.
Click Application<n> in the developer toolbar.
Select Application Primary Language for Application Language Derived From, and click Apply Changes.
Under Globalization, click Translate Application.
Enter a unique Application ID for Translation Application, German (Germany) (de) for Language, and click Create.
Note: Seeding the translation copies translatable text into the translation text repository. Once the translatable text is seeded, you can translate the text strings.
Select the check-box for your Translated Application, and click Seed.
Click Download XLIFF translation files.
Select German (Germany) (de) for Language, and click Export XLIFF File for Application. Save the exported file into your working directory.
Open the exported XLIFF File in a text editor. Press Ctrl+H. For Find what, enter <target>. For Replace with, enter <target>Ordnung. Click Replace All.
Save the changes, and close the file.
In the Oracle Application Express window, click the Translate breadcrumb.
Once the XLIFF file is populated with the translations, the XLIFF file is uploaded back into the translation repository. To do this, click Apply XLIFF translation files.
Click Browse, browse to your working directory, select the XLIFF File you modified in the previous step, and click Upload.
Select the check-box for the row with your XLIFF file name, select a translation mapping for Apply to Translation, and click Apply Checked.
The final step is to publish the translated application from the translation repository. To do this, click Publish translated applications.
Select the check box for the Translated Application, and click Publish.
The translated application is successfully published. Click the Shared Components breadcrumb.
Globalization attributes specify how Oracle Application Express determines the primary language for an application. Perform the following steps to view your translated application by specifying the Primary Language.
Select German (Germany) (de) for Application Primary Language, Application Primary Language for Application Language Derived From, and click Apply Changes.
Enter your Oracle Application Express credentials, and click OrdnungLogin.
Notice that the application is translated to German based on the XLIFF file that was uploaded.
In the next section, you will see how to translate messages used in PL/SQL. Click Anwendung<n> in the developer toolbar.
Define each message on the Translatable Messages page.
Use the APEX_LANG.MESSAGE API to translate the messages from PL/SQL stored procedures, functions, triggers, or packaged procedures and functions.
Create translatable messages on the Translate Messages page.
Select English (en) for Application Primary Language, No NLS (Application not translated) for Application Language Derived From, and click Apply Changes.
You want to define a message called Greeting_Message in your application in English as "Good morning %0" and in German as "Guten Tag %0" and invoke this message from PL/SQL in the Home page by creating a region called Translation Region. Click 1 - Home.
In the Rendering tab, right-click Region Position 01, and select Create Region.
In the property editor, under Identification, enter Translation Region for Title, select PL/SQL Dynamic Content for Type. Under Source, enter the below given code for PL/SQL Code, and click Save.
Click the Shared Components icon.
Under Globalization, click Text Messages.
Enter GREETING_MESSAGE for Name, select English (en) for Language, enter Good Morning %0 for Text, and click Create And Create Another.
Enter GREETING_MESSAGE for Name, select German (Germany) (de) for Language, enter Guten Tag %0 for Text, and click Create Text Message.
Click the Run Page 1 icon.
The Translation Region with the English greeting message is displayed. Click Application<n> in the developer toolbar.
You want to display this greeting message in German.Click Shared Components.
Select German (Germany) (de) for Application Primary Language, No NLS (Application not translated) for Application Language Derived From, and click Apply Changes.
The Home page is displayed with the Greeting message translated in German.