Home > Managing Application Global... > About Translating an Applic... > About Translatable Components
Previous |
Next |
When you build an application in Application Builder, you define a large number of declarative attributes such as field labels, region headings, page header text, and so on. Using the steps described in this section, you can make all the application definition attributes within your application translatable.
Application Builder includes two shortcut types that enable you to reference translatable messages:
Message. Use this shortcut to reference a translatable message at run time. Note that the name of the shortcut must match the corresponding message name. At run time, the name of the shortcut expands to the text of the translatable message for the current language.
Message with JavaScript Escaped Single Quotes. Use this shortcut to reference a shortcut inside of a JavaScript literal string and reference a translatable message at run time. This shortcut defines a text string. When the shortcut is referenced, it escapes the single quotation marks required for JavaScript.
If your application includes PL/SQL regions or PL/SQL processes, you may must translate any generated HTML or text. You may also need to translate messages used in reports if your application uses a language that is not one of the ten languages into which Oracle Application Express is translated.
Dynamic translations are used for database data that needs to be translated at run time. For example, you might use a dynamic translation to translate a list of values based on a database query. A dynamic translation consists of a translate-from language string, a language code, and a translate-to string. You can also use the APEX_LANG.LANG
API to retrieve dynamic translations programmatically.
By default, page region titles are included in the generated translation file. However, you can mark a region title as not translatable.
To mark a region title as not translatable:
Navigate to the Page Definition. See "Accessing a Page Definition".
On the Page Definition, select the region title.
The Edit Region page appears.
Select the exclude title from translation check box.
By default, templates are not translatable, and therefore are not included in the generated translation file. Generally, templates do not and should not contain translatable text. However, if you must mark a template as translatable, select the Translatable check box on the Edit Page Template page.
To identify a template as translatable:
On the Workspace home page, click the Application Builder icon.
Select an application.
On the Application home page, click Shared Components.
Under User Interface, select Templates.
The Templates page appears.
Locate the template you want to edit and select the template name.
Under Name, select Translatable.
You can include translatable text at the application-level by defining the translatable text using static substitution strings. Because application-level attributes are translated, any text defined as a static substitution string will be included in the generated translation file.