39.17 UPDATE_TRANSLATED_STRINGプロシージャ

このプロシージャを使用して、シードされた翻訳リポジトリの翻訳文字列を更新します。

ノート:

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

構文

APEX_LANG.UPDATE_TRANSLATED_STRING (
    p_id        IN NUMBER,
    p_language  IN VARCHAR2
    p_string    IN VARCHAR2 )

パラメータ

パラメータ 説明
p_id 翻訳リポジトリ内の文字列のID。
p_language 既存の翻訳マッピング用のIANA言語コード。たとえば、en-usfr-cajaheがあります。このマッピングの言語はこのプロシージャでは更新できません。新しい翻訳アプリケーションIDのみです。
p_string 翻訳リポジトリ内の文字列の新しい値。

次の例に、翻訳リポジトリ内の既存の文字列の更新方法を示します。

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;
    -- Locate all strings in the repository for the specified application
    -- which are 'Search' and change to 'Find'
    for c1 in (select id
                 from apex_application_trans_repos
                where application_id = 63969
                  and dbms_lob.compare(from_string, to_nclob('Search')) = 0
                  and language_code = 'en') loop
        apex_lang.update_translated_string(
            p_id => c1.id,
            p_language => 'en',
            p_string => 'Find');
        commit;
        exit;
    end loop;
end;
/