Skip to Main Content


Question and Answer

Connor McDonald

Thanks for the question, Eliasz.

Asked: January 31, 2022 - 8:50 am UTC

Last updated: February 28, 2024 - 6:33 am UTC


Viewed 1000+ times

You Asked


I have a problem with downloading XLIFF file for whole application (Shared Components\Translate\XLIFF Export). It looks the request timeouts after 5 minutes ("Failed to load resource: the server responded with a status of 500 (Internal Server Error)").

The application is quite big, with several hundred of pages. For single page it works, but not all translations are page specific (some are not assigned to any page).

I tried to somehow get this file on database level. There is a package wwv_flow_xliff (schema apex_200200) with function & procedure get_translation_document.

function get_translation_document(
    p_flow_id             in number,
    p_page_id             in number default null,
    p_translation_flow_id in number,
    p_include_target      in varchar2 default 'N',
    p_include_all         in varchar2 default 'N',
    p_item_help           in varchar2 default null )
return blob;

It looks promising, but it fails ("PL/SQL: numeric or value error%s") when I try to run it like this:

xliff_file  blob;
    xliff_file := apex_200200.wwv_flow_xliff.get_translation_document(
        p_flow_id => 500,
        p_translation_flow_id => 502


The same happens when specific page_id is provided.

Is there a way to get this working either from web or using this package? The latter solution would be just fine if the timeout issue cannot be resolved easily.

I also tried to manually generate this file from translation tables [wwv_flow_translatable_text$; wwv_flow_messages$; wwv_flow_dynamic_translations$, etc.], but these are all workarounds with next problems like xml escape characters...

For all that, APEX gives a legit way to export this file.
I will appreciate your help a lot! 😊
Thanks in advance.

and Connor said...

Because its not meant to be called from SQL but from APEX you'd need to initialise the environment, eg

SQL> declare
  2  nm owa.vc_arr;
  3  vl owa.vc_arr;
  4  begin
  5  nm(1) := 'REMOTE_ADDR';
  6  vl(1) := '';
  7  owa.init_cgi_env( nm.count, nm, vl );
  8  end;
  9  /

PL/SQL procedure successfully completed.

SQL> declare
  2    xliff_file  blob;
  3  begin
  4    dbms_lob.createtemporary(xliff_file ,true);
  5      xliff_file := apex_210200.wwv_flow_xliff.get_translation_document(
  6          p_flow_id => 100,
  7          p_translation_flow_id => 502
  8      );
 10  end;
 11  /

PL/SQL procedure successfully completed.

but better is to log an SR with, because that should not time out - sounds like a bug to me.


  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment



Eric Lanning, February 27, 2024 - 6:24 pm UTC

Where can I find documentation on how to use the 5 elements of this package WWV_FLOW_XLIFF.
I can deduce some information from the package spec, but I don't understand the distinction between generate_, print_ and get_

When I execute get_translation_document I get an XLIFF blob with only a header, no actual translation content.
Connor McDonald
February 28, 2024 - 6:33 am UTC

APEX items prefixed with WWV are generally not intended for direct use, which is why you wont find documentation for it.

There is an item on the APEX roadmap to improve the API layer around this

More to Explore


Keep your APEX skills fresh by attending their regular Office Hours sessions.