0

I have created a multi language APEX application in the guidance of Oracle APEX 5.0: Managing Application Globalization. I have translated all Interactive Report Messages (ie. APEXIR_*) to several languages. However, I cannot use/refer those messages in HTML/Javascript.

I have tried the methods mentioned in Oracle APEX: Understanding Substitution Strings: Neither &APEXIR_HELP., nor #APEXIR_HELP# worked.

There is a suggestion to use APEX_LANG.MESSAGE in Oracle APEX:Translating Messages. However, that method seem to work with PL/SQL queries. I do not know how to use that in HTML or Javascript.

NOTE: The technical requirement is to show APEXIR_HELP translations in GUI. ie. "Help" must be placed in English translation and "Hilfe" in Dutch translation in place of &APEXIR_HELP. in the code below:

<span style="margin-right: 15px"><a href="&P_HELP_LINK./0&APP_ID..htm" target="_blank"><font style="text-transform: capitalize;">&APEXIR_HELP.</font></a></span>

Edit1: I use APEX 5.0 and the result of WWV_FLOW_MESSAGES query is:

FLOW_ID   NAME          MESSAGE_LANGUAGE   MESSAGE_TEXT   IS_JS_MESSAGE
113       APEXIR_HELP   en                 Help           Y
113       APEXIR_HELP   en-us              Help           Y
113       APEXIR_HELP   tr                 Yardım         Y
4
  • So you have an own button which will open up some link and as text has the APEXIR_HELP message text? Where are you placing this link html?
    – Tom
    May 12, 2015 at 11:29
  • @tom Exactly. That piece of code is in header section. More precisely, it relies under <header id="uHeader"> <div class="apex_grid_container clearfix"> <div class="apex_cols apex_span_12"> <div class="logoBar"> <div class="userBlock"> section of 25th template.
    – dante deo
    May 12, 2015 at 12:01
  • I have APEX 4.2, so i tried: select * from APEX_040200.WWV_FLOW_MESSAGES$ t where t.name = 'APEXIR_HELP' - it shows me two messages in two languages. Show us your result of this query (but change scheme/user)
    – NoGotnu
    May 19, 2015 at 5:50
  • @NoGotnu I have added the result into main thread.
    – dante deo
    May 20, 2015 at 7:13

1 Answer 1

0

You can't use internal messages (like APEXIR_HELP) in you html/javascript code. So, APEXIR_HELP message appeares only in IR report menu. You can translate it to your own language (via Globalization -> Text Messages), and then, it will appear in this menu already translated. If you want to use own translated messages, try this:

  1. Add new message in Globalization -> Text Messages (for example: MY_HELP_MESSAGE).
  2. Add new item to your page (for example P1_ITEM1), source of the item is: APEX_LANG.MESSAGE('MY_HELP_MESSAGE', V('APP_USER'));
  3. Then use &P1_HELP. in you HTML/Javascript code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.