21.2 Specifying the Primary Language for an Application

Globalization attributes specify how the Application Express engine determines the primary language of an application.

To edit globalization attributes:

  1. On the Workspace home page, click the Application Builder icon.

  2. Select an application.

  3. Click Shared Components.

  4. Under Globalization, select Globalization Attributes.

  5. For Application Primary Language, select the language in which the application is being developed.

  6. For Application Language Derived From, specify how the Application Express engine determines (or derives) the application language. The application primary language can be static, derived from the Web browser language, or determined from a user preference or item. Table 21-1 describes available options:

    Table 21-1 Application Language Derived From Options

    Option Description

    No NLS (Application not translated)

    Select this option if the application will not be translated.

    Application Primary Language

    Determines the application's primary language based on the Application Primary Language attribute. (See step 5.)

    Browser (use browser language preference)

    Determines the application's primary language based on the user's browser language preference.

    Application Preference (use FSP_LANGUAGE_PREFERENCE)

    Determines the application's primary language based on a value defined using the APEX_UTIL.SET_PREFERENCE API. Select this option to maintain the selected language preference across multiple logins.

    See Also: "SET_PREFERENCE Procedure" in Oracle Application Express API Reference

    Item Preference (use item containing preference)

    Determines the application's primary language based on an application-level item called FSP_LANGUAGE_PREFERENCE. Using this option requires Oracle Application Express to determine the appropriate language preference every time the user logs in.

    Session

    Determines the translated application language from the session setting. The Application Express session language can be set through either the APEX_UTIL.SET_SESSION_LANG procedure or by using the p_lang parameter of the "f" procedure in the URL.


  7. Configure other options as appropriate. To learn more about an attribute, see field-level Help.

  8. Click Apply Changes.

21.2.1 Using Format Masks for Items

This section describes how to use format masks for items.

21.2.1.1 About Apply Format Masks to Items

The Application Express engine applies globalization settings for each rendered page. This default behavior can impact the display of certain items such as numbers and dates.

For example, suppose your application determines the application language based on the user's browser language preference. If the Application Express engine determines the users's browser language preference is French, it displays dates and numbers in a format that conforms to French standards. You can override this default behavior and explicitly control how items display by applying a format mask. You apply a format mask by making a selection from the Display As list:

  • When you create the item.

  • After you create the item by editing the item attributes.

21.2.1.2 Example of Editing Item Attributes

The following section describes how to edit item attributes for items having the source type of Database Column.

To edit item attributes:

  1. On the Workspace home page, click the Application Builder icon.

  2. Select an application.

  3. Navigate to the appropriate page. See "Viewing a Page in Component View."

  4. Select an item.

    The Edit Page Item page appears.

  5. Under Name, make a selection from the Display As list.

  6. Under Source, Format Mask, select or enter a format mask.

21.2.2 About Translating Applications for Multibyte Languages

If your application must run in several languages simultaneously (such as Chinese and Japanese), consider configuring your database with a character set to support all of the languages. UTF8 and AL32UTF8 are the character sets you can use to support almost all languages around the world.