39.12 SEED_TRANSLATIONSプロシージャ

このプロシージャは、指定されたアプリケーションおよび言語の翻訳リポジトリをシードします。このプロシージャは、アプリケーションから新規、更新済および削除済の翻訳可能文字列のすべてを翻訳リポジトリに移入します。アプリケーションの翻訳バージョンを更新するたびに、シードおよび公開プロセスを実行し、プライマリ・アプリケーションと同期させます。

構文

APEX_LANG.SEED_TRANSLATIONS (
    p_application_id    IN NUMBER,
    p_language          IN VARCHAR2 )

パラメータ

パラメータ 説明
p_application_id 翻訳リポジトリを更新するアプリケーションのID。これはプライマリ言語アプリケーションのIDです。
p_language 既存の翻訳マッピング用のIANA言語コード。たとえば、en-usfr-cajaheがあります。

次の例では、Oracle APEXアプリケーションおよび言語の翻訳リポジトリのシード・プロセスを示します。

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, seed the translation repository
    apex_lang.seed_translations(
        p_application_id => 63969,
        p_language => 'ja' );
    commit;
    -- Print out the total number of potentially translatable strings
    --
    for c1 in (select count(*) thecount
                 from apex_application_trans_repos
                where application_id = 63969) loop
        dbms_output.put_line( 'Potentially translatable strings found: ' || c1.thecount );
    end loop;
end;
/