27.1 CREATE_MESSAGE Procedure
Use this procedure to create a translatable text message for the specified application.
Syntax
APEX_LANG.CREATE_MESSAGE (
  p_application_id           IN NUMBER,
  p_name                     IN VARCHAR2,
  p_language                 IN VARCHAR2,
  p_message_text             IN VARCHAR2,
  p_used_in_javascript       IN BOOLEAN default FALSE )Parameters
Table 27-1 CREATE_MESSAGE Procedure Parameters
| Parameter | Description | 
|---|---|
| 
 | The ID of the application for which you wish to create the translatable text message. This is the ID of the primary language application. | 
| 
 | The name of the translatable text message. | 
| 
 | The IANA language code for the mapping. Examples include
                                     | 
| 
 | The text of the translatable text message. | 
| 
 | Specify if the message needs to be used directly by JavaScript code (use the  | 
Example
The following example demonstrates the creation of a translatable text message.
BEGIN
    --
    -- If running from SQL*Plus or sqlcl, we need to set the environment
    -- for the Application Express workspace associated with this schema. The
    -- call to apex_util.set_security_group_id is not necessary if
    -- you're running within the context of the App Builder
    -- or an Application Express application.
    --
    for c1 in (select workspace_id
                from apex_workspaces
                where workspace = 'HR_DEV') loop
            apex_util.set_security_group_id( c1.workspace_id );
            exit;
        end loop;
    apex_lang.create_message(
        p_application_id => 63969,
        p_name => 'TOTAL_COST',
        p_language => 'ja',
        p_message_text => 'The total cost is: %0',
        p_used_in_javascript => true );
    commit;
END;
/Parent topic: APEX_LANG