23.8 UPDATE_LANGUAGE_MAPPINGプロシージャ

このプロシージャを使用して、アプリケーションの翻訳の言語マッピングを更新します。翻訳されたアプリケーションは新しいアプリケーションとして公開されますが、アプリケーション・ビルダーで直接編集することはできません。

注意:

このプロシージャはApplication Expressリリース4.2.3以降で使用できます。

構文

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

パラメータ

表23-7 UPDATE_LANGUAGE_MAPPINGパラメータ

パラメータ 説明

p_application_id

言語マッピングを更新するアプリケーションのID。これはプライマリ言語アプリケーションのIDです。

p_language

既存のマッピング用のIANA言語コード。たとえば、en-us、fr-ca、ja、heがあります。このマッピングの言語はこのプロシージャでは更新できません。新しい翻訳アプリケーションIDのみです。

p_new_trans_application_id

基礎となる翻訳済アプリケーションIDの新しい一意の整数。この数字は0で終了することはできません。

次の例に、既存のApplication Expressアプリケーションの言語マッピングおよび既存の翻訳マッピングの更新方法を示します。

begin
    --
    -- If running from SQL*Plus, 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) 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;
/