31.10 UPDATE_LANGUAGE_MAPPING Procedure

Use this procedure to update the language mapping for the translation of an application. Translated applications are published as new applications, but are not directly editable in the App Builder.

Note:

This procedure is available in Oracle APEX release 4.2.3 and later.

Syntax

APEX_LANG.UPDATE_LANGUAGE_MAPPING (
    p_application_id            IN NUMBER,
    p_language                  IN VARCHAR2,
    p_new_trans_application_id  IN NUMBER )

Parameters

Table 31-9 UPDATE_LANGUAGE_MAPPING Parameters

Parameters Description
p_application_id The ID of the application for which you want to update the language mapping. This is the ID of the primary language application.
p_language The IANA language code for the existing mapping. Examples include en-us, fr-ca, ja, he. The language of the mapping cannot be updated with this procedure, only the new translation application ID.
p_new_trans_application_id New unique integer value for the ID of the underlying translated application. This number cannot end in 0.

Example

The following example demonstrates the update of the language mapping for an existing APEX application and existing translation mapping.

begin
    --
    -- If running from SQL*Plus, we need to set the environment
    -- for the Oracle APEX 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 APEX application.
    --
    for c1 in (select workspace_id
                 from apex_workspaces) loop
        apex_util.set_security_group_id( c1.workspace_id );
        exit;
    end loop;
    -- Now, update the language mapping
    apex_lang.update_language_mapping(
        p_application_id => 63969,
        p_language => 'ja',
        p_new_trans_application_id => 881188 );
    commit;
    --
    -- Print what we just updated to confirm
    --
    for c1 in (select *
                 from apex_application_trans_map
                where primary_application_id = 63969) loop
        dbms_output.put_line( 'translated_application_id: ' || c1.translated_application_id );
        dbms_output.put_line( 'translated_app_language: ' || c1.translated_app_language );
    end loop;
end;
/