This discussion is archived
1 2 3 4 Previous Next 49 Replies Latest reply: Apr 4, 2013 7:36 AM by 983342 Go to original post RSS
  • 15. Re: How to do the translation of alert messages from javascript
    peter_raganitsch Oracle ACE Director
    Currently Being Moderated
    Here is another simple idea.

    Why not defining some text messages with a special name, e.g. starting with "JS_". Then create a PL/SQL-Region that reads all Text-Messages (JS%) and create a JS-Array with that.

    brgds,
    Peter
  • 16. Re: How to do the translation of alert messages from javascript
    Arie Geller Guru
    Currently Being Moderated
    Hello Peter,

    >> Then create a PL/SQL-Region that reads all Text-Messages (JS%) and create a JS-Array with that

    Maybe you do have a simple solution, unfortunately, I'm not sure I understand what you are suggesting. Are you talking about a JavaScript array that will be populated per page? Per application? Can you give the code skeleton of the proposed solution?

    >> Why not defining some text messages with a special name, e.g. starting with "JS_".

    Bear in mind that currently, the Text Messages mechanism doesn't include an option of creating a new message based on an existing one. If you want to add a new set of "JS_" messages, in a new language, the best you can do with the current mechanism is to filter and collect all the existing "JS_" messages. Now you need to manually add each new message from scratch (i.e., including the English message name). So, anyway you are looking at it, simple it's not.

    Regards,
    Arie.
  • 17. Re: How to do the translation of alert messages from javascript
    983342 Newbie
    Currently Being Moderated
    Hi Arie,

    Thanks again for your time.

    Yes I understood what you are saying, translations involve a lot of work to do :(

    What I am doing after your suggestion is created a .js file and for each alert message written a function using that switch case statement

    and calling specific function from for every alert message, is this fine?

    I have noticed one more thing in these alerts/confirm messages, we have "OK" and "Cancel" buttons, these are not getting converted, do you have any idea about that?

    I did some search for that, it was written somewhere that these buttons text depends on the OS language and I have to use DHTML dialog boxes instead.

    Please give some suggestion on this.

    For alias, still working on that, will inform if get some progress on that.

    Regards
    Ani
  • 18. Re: How to do the translation of alert messages from javascript
    Arie Geller Guru
    Currently Being Moderated
    Hello Ani,

    >> Yes I understood what you are saying, translations involve a lot of work to do …

    As one who works a lot with translated applications, trust me, it could have been much worst. Bear in mind that the logic of your application is hardly influenced by the translation process, which is a big advantage. Most of the UI is translatable quite simply, using the built-in APEX translation mechanism, which keep getting better with every version. What's left is indeed the messages in the external JavaScript files, but you need to remember that the APEX engine doesn't have direct access to these files.

    >> for each alert message written a function using that switch case statement …

    I'm not sure each text message deserves its own independent function, unless it's a repeated message (e.g., "Are you sure?"). If you have a specific text message, with a single appearance, the switch statement can be part of the function that is using the message.

    >> we have "OK" and "Cancel" buttons, these are not getting converted, do you have any idea about that?

    These buttons are directly rendered by the HTML engine of the local browser. Their language is determined by the language of the local OS and the browser language. It usually means that the users are accustomed to these buttons and their language, as this is what they see in all their browser activities (and not just for the APEX applications). The solution is to replace these built-in HTML buttons with your own objects, like DHTML dialog boxes, but in my opinion, in most cases it doesn't worth the bother.

    >> For alias, still working on that, will inform if get some progress on that

    One general comment. If the footprint of the external JavaScript file(s) are important (like in the case of developing for mobile devices) and you already need to use language dependent aliases, another option is to maintain a separate JavaScript file(s) for each translated language. In this case, each JavaScript file will be smaller in size.

    Regards,
    Arie.
  • 19. Re: How to do the translation of alert messages from javascript
    983342 Newbie
    Currently Being Moderated
    Hi Arie,

    I will look into the javascript alerts part, I have got much clarification on that, thanks to you.

    But now again coming back the Alias of Image directory.

    I created an alias for my another images directory in my dads.conf file like this:

    Alias /ipt/ "/u02/oracle/product/10gcomp/Apache/Apache/images_pt/"

    then restarted the Apache and used the above alias "/ipt/" in my translated application "Application Language Mapping" image directory.

    and republished my application.

    But when I am doing the conversion by clicking the language nothing is displaying in my form neither images nor any items,

    just some Edit texts with link are displaying. English version is working fine.

    I checked in firebug, I see everything fine, /i/ is replaced by /ipt/ and all the file paths are displaying fine.

    Please let me know where I am going wrong.

    Regards
    Ani
  • 20. Re: How to do the translation of alert messages from javascript
    Arie Geller Guru
    Currently Being Moderated
    Hello Ani,

    >> Alias /ipt/ "/u02/oracle/product/10gcomp/Apache/Apache/images_pt/"

    It seems that the Web application doesn't find any files in the new alias path. Did you remember to actually create the (real) images_pt directory?

    Regards,
    Arie.
  • 21. Re: How to do the translation of alert messages from javascript
    983342 Newbie
    Currently Being Moderated
    Hi Arie,

    Yes, I checked again, its there in that path.

    Regards
    Ani.
  • 22. Re: How to do the translation of alert messages from javascript
    Arie Geller Guru
    Currently Being Moderated
    Hello Ani,

    You should go to the Apache log directory – usually found at *...\Apache\Apache\logs* - and see the exact error message reported by the application server. It should give you much more information regarding the nature of the problem.

    Regards,
    Arie.
  • 23. Re: How to do the translation of alert messages from javascript
    983342 Newbie
    Currently Being Moderated
    Hi Arie,

    I checked the latest error_log file, I didn't found any error related to new /ipt/ alias, there are some lines like this:

    [Tue Jan 29 05:08:34 2013] File does not exist: /u02/oracle/product/10gcomp/Apache/Apache/images/themes/charlie/css/cattleinvestors.com1/images/ui-bg_highlight-hard_50_efc05e_1x100.png

    One more thing Arie,

    I just checked in firebug, I am getting this error:
    ReferenceError: apex is not defined
    
    apex.jQuery(document).ready(function(){
    is this means, its not finding the jquery files ?

    Regards
    Ani

    Edited by: anicl on Jan 29, 2013 9:48 AM
  • 24. Re: How to do the translation of alert messages from javascript
    Arie Geller Guru
    Currently Being Moderated
    Hello Ani,

    Both error messages clearly state that your application server doesn't find certain files. The first message is about a specific png file, and the second one is most likely pertains to the APEX built-in JavaScript library, which defines the apex namespace (which in turn calls the jQuery library).

    The path specified in your error message seems to pertain to the main language alias - *…/Apache/Apache/images*. If this error message was received during the run of a translated application, it seems that the alias that should point to *…/Apache/Apache/images_pt* is not well defined.

    Did you restart your web application after defining the new alias?

    Regards,
    Arie.
  • 25. Re: How to do the translation of alert messages from javascript
    983342 Newbie
    Currently Being Moderated
    Hi Arie,

    As mentioned earlier, after adding the alias I have restarted the Apache server.

    let me again create the images_pt folder again and try, will let you know after that.

    Regards
    Ani
  • 26. Re: How to do the translation of alert messages from javascript
    983342 Newbie
    Currently Being Moderated
    Hi Arie,

    No luck, its still the same.

    In this post:
    How to change /i/ reference in APEX installation

    its mentioned that to add these two lines in the dads.conf file, is it necessary to add?
    AddType text/xml xbl
    AddType text/x-component htc
    and also, there its mentioned to run "reset_image_prefix.sql" do I need to run this also?


    Regards
    Ani
  • 27. Re: How to do the translation of alert messages from javascript
    Arie Geller Guru
    Currently Being Moderated
    Hello Ani,

    >> its mentioned that to add these two lines in the dads.conf file, is it necessary to add?

    This is an old request, with the purpose of regulating the use of some non-standard (at least at that time) HTML components in the IE environment. It's no longer necessary with the latest version of APEX, as described in the following: http://docs.oracle.com/cd/E37097_01/doc/install.42/e35123/otn_install.htm#CHDHCBGI .

    >> and also, there its mentioned to run "reset_image_prefix.sql" do I need to run this also?

    This utility is intended to be used by those who changed their alias for an existing installation. It should not be relevant in your case, as you are not changing the defined alias for the primary language application; you are trying to add another alias for the translated one(s).

    You should examine the source code of a page from the translated application and see how the APEX engine translate the /ipt/ alias. Is the path in the source code correct? Points to the images_pt directory?

    As the English version of the application works fine, it may be a corrupt metadata in the relevant APEX engine table. You can also try to delete the current language map (and by that eliminating the corresponding translated application), and try to re-define it. As the main language application is remain the same, the "old" XLIFF file can still be used with the "new" translated application.

    If all that still doesn't help, please show the relevant content of your dads.conf file.

    Regards,
    Arie.
  • 28. Re: How to do the translation of alert messages from javascript
    983342 Newbie
    Currently Being Moderated
    Ok Arie, Thanks, will try this and update you.

    Regards
    Ani
  • 29. Re: How to do the translation of alert messages from javascript
    983342 Newbie
    Currently Being Moderated
    Hi Arie,

    Still same issue. I deleted the existing Mapped application, created the new mapped application with different number, but still I am getting that same error.

    " ReferenceError: apex is not defined"

    I checked the page source, there its coming up fine I think, below is one example of a stylesheet address:
    <link type="text/css" href="/ipt/libraries/jquery-ui/1.8.14/themes/base/jquery-ui.min.css" rel="stylesheet">
    Its replacing "/i/" with "/ipt/" and also the path is correct.

    You said "see how the APEX engine translate the /ipt/ alias"

    How can I do that?

    And one more thing, not only english version, portuguese version is also working fine,

    its just when I specify /ipt/ as the image directory in the Mapped Application,

    then I am getting that error and also not able to view any images as well as Items on page.

    Regards
    Ani

    Edited by: anicl on Feb 1, 2013 8:02 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points