39.2 CREATE_LANGUAGE_MAPPING Procedure
Use this procedure to create 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.CREATE_LANGUAGE_MAPPING (
p_application_id IN NUMBER,
p_language IN VARCHAR2,
p_translation_application_id IN NUMBER,
p_direction_right_to_left IN BOOLEAN DEFAULT FALSE,
p_image_directory IN VARCHAR2 DEFAULT NULL )
Parameters
Parameter | Description |
---|---|
p_application_id |
The ID of the application for which you want to create the language mapping. This is the ID of the primary language application. |
p_language |
The IANA language code for the mapping. Examples include en-us , fr-ca , ja , he .
|
p_translation_application_id |
Unique integer value for the ID of the underlying translated application. This number cannot end in 0. |
p_direction_right_to_left |
Specify document direction left-to-right or right-to-left. |
p_translation_image_directory |
Specify the directory where images are stored. |
Example
The following example demonstrates the creation of the language mapping for an existing APEX application.
BEGIN
--
-- If running from SQLcl, 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, actually create the language mapping
apex_lang.create_language_mapping(
p_application_id => 63969,
p_language => 'ja',
p_translation_application_id => 778899 );
COMMIT;
--
-- Print what we just created 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;
/
Parent topic: APEX_LANG