31.11 UPDATE_MESSAGEプロシージャ

このプロシージャを使用して、指定したアプリケーションの翻訳可能テキスト・メッセージを更新します。

構文

APEX_LANG.UPDATE_MESSAGE (
  p_id             IN NUMBER,
  p_message_text   IN VARCHAR2 )

パラメータ

表31-10 UPDATE_MESSAGEパラメータ

パラメータ 説明
p_id テキスト・メッセージのID。
p_message_text 翻訳可能テキスト・メッセージの新しいテキスト。

次の例に、既存の翻訳可能テキスト・メッセージの更新方法を示します。

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;
    -- Locate the ID of the specific message and update it with the new text
    for c1 in (select translation_entry_id
                 from apex_application_translations
                where application_id = 63969
                  and translatable_message = 'TOTAL_COST'
                  and language_code = 'ja') loop
        apex_lang.update_message(
            p_id => c1.translation_entry_id,
            p_message_text => 'The total cost is: %0');
        commit;
        exit;
    end loop;
end;
/