Previous
Previous
 
Next
Next

APEX_LANG.LANG API

Syntax

APEX_LANG.LANG (
    p_primary_text_string    IN    VARCHAR2 DEFAULT NULL,
    p0                       IN    VARCHAR2 DEFAULT NULL,
    p1                       IN    VARCHAR2 DEFAULT NULL,
    p2                       IN    VARCHAR2 DEFAULT NULL,
    ...
    p9                       IN    VARCHAR2 DEFAULT NULL,
    p_primary_language       IN    VARCHAR2 DEFAULT NULL)
    RETURN VARCHAR2;

Parameters

Table: APEX_LANG.LANG Parameters describes the parameters available in the APEX_LANG.LANG API.

APEX_LANG.LANG Parameters

Parameter Description

p_primary_string

Text string of the primary language. This will be the value of the Translate From Text in the dynamic translation.

p0

...

p9

Dynamic substitution value: p0 corresponds to 0% in the in the translation string; p1 corresponds to 1% in the translation string; p2 corresponds to 2% in the translation string, and so on.

p_primary_language

Language code for the message to be retrieved. If not specified, Oracle Application Express uses the current language for the user as defined in the Application Language Derived From attribute.

See Also: "Specifying the Primary Language for an Application"


Example

Suppose you have a table that defines all primary colors. You could define a dynamic message for each color and then apply the LANG function to the defined values in a query. For example:

SELECT APEX_LANG.LANG(color)
  FROM my_colors

If you were running the application in German, RED was a value for the color column in the my_colors table, and you defined the German word for red, the previous example would return ROT.