Oracle
Application Express 18: Translating an App (1 of 2) - Defining
Translatable Text Messages
Before You Begin
This 15-minute tutorial shows how you to create text
messages (both in English and German) in the pre-built Create
App Wizard application, which uses English as the
primary language.
This is the first tutorial in Oracle Application Express
18: Translating an App Series. Read the tutorials in
sequence:
Oracle Application Express 18: Translating an App (1 of 2) -
Defining Translatable Text Messages
You translate messages when your application includes PL/SQL
regions, processes, package, procedure or function. You may need
to translate messages if your application:
Includes PL/SQL regions or PL/SQL processes, or calls a
PL/SQL package, procedure, or function. If it does, you may
need to translate the generated HTML.
Uses a language that is not one of the ten languages into
which Oracle Application Express is translated. If it does,
you may need to translate messages used in reports.
What Do You Need?
Access to Oracle Application Express 18.1 or later.
How you sign in and access Oracle Application Express depends
upon where Oracle Application Express resides. Oracle
Application Express may reside in a local on-premises Oracle
Database or in a hosted environment, such as the Oracle Cloud.
The sign in credentials you use to sign in differ depending upon
the installation type.
Free Workspace: Give Oracle Application
Express a test run by signing up for a free workspace. To
request an evaluation workspace, go to apex.oracle.com,
and click Get Started for Free.
Oracle Cloud: Develop and deploy
applications without worrying about infrastructure, repair,
and downtime. Oracle Application Express is available in
Exadata Express Cloud Service and Database Cloud Service.
However, you need to manually customize your databases to
install and enable Oracle Application Express. To learn more,
see Oracle
Database Cloud Service.
Oracle Application Express On-premises:
Install Oracle Application Express directly within any Oracle
Database and then sign in to your workspace using your sign in
credentials. For details on your sign in credentials, contact
your administrator or see Oracle
Application Express Installation Guide.
Oracle Application Express Pre-Built VM:
Install a Pre-Built Virtual Machine (VM) which includes an
Oracle Database and Oracle Application Express 18.1. To learn
more, see Hands-On
Labs.
Once the VM is installed, start the VM:
Click the big red circle labeled Start.
Click the APEX shortcut, or enter the
following URL: http://localhost:8080/ords/f?p=4550:1
When prompted to sign in, enter the sign in credentials
(unless given other credentials to use):
Workspace: obe
Username: obe
Password: oracle
Create
Messages Used in PL/SQL
Text Messages can be used to build translatable text strings
with variables that can be called from PL/SQL packages,
procedures, and functions. If your application includes PL/SQL
regions or PL/SQL processes or calls PL/SQL packages,
procedures, or functions, you need to translate generated HTML
as explained below:
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.
To create messages used in PL/SQL, perform the following steps:
Sign in to Oracle Application Express by entering the
credentials (workspace, username, and password).
In the Workspace homepage, click App Builder and open your Create
App Wizard application.
To define a message called Greeting_Message in your
application in English and in German and invoke this message
from PL/SQL in the Home page, you create a region called
Translation Region. To create the Translation Region:
Globalization attributes specify how the Application Express
engine determines the primary language of an application.
Perform the following steps to view your application by
specifying the primary language.
Click the Shared Components breadcrumb.
Under Globalization, click Globalization Attributes.