My question concerns the Instant Translation example app, which worked fine in earlier versions of Orbeon Forms (ops-3.5.1, orbeon-3.7) and as recently as Sept. 2008.
After source code was changed (Ajaxified) to account for the Google Translate service returning a JSONObject, this app worked OK (circa 09-2008). However, not long thereafter, I'd get a "Session expired" error whenever I clicked in the input-area (labeled 'Translate text:'). Perhaps the Orbeon Forms 3.8.0 version of Instant Translation fixed this problem by adding the following line to the view.xhtml file: <xforms:setfocus ev:event="xforms-ready" control="input-area"/> Now, however, translated output does not display in the area labeled 'Translation:'. This holds true for different browsers and when viewing the app on localhost or a public site (e.g., orbeon.com). Are other users experiencing this problem (no display of translation into target language)? I wonder if a Google requirement (see http://code.google.com/apis/ajaxlanguage/documentation/#Examples) is causing the problem: "For google.language.translate, the POST method is available. Applications that use this interface must abide by all existing terms of use (http://code.google.com/apis/ajaxlanguage/terms.html). An area to pay special attention to relates to correctly identifying yourself in your requests. Applications MUST always include a valid and accurate http referer header ... in their requests." (But note that this requirement appears in a section entitled 'For Flash and other Non-JavaScript Environments'). After adding an http_referer element pointing to localhost in the header of the view.xhtml file, I got the following error: Condition failed for every branch of choose: [(/request/request-path = '/xforms-server-submit'), (/request/request-path = '/xforms-translate/'), (/request/request-path = '/xforms-translate/post')] Details: Resource URL -> oxf:/page-flow.xml Line 34 Column 106 Description -> reading page model data output page id -> apps model -> apps/${1}/page-flow.xml Element: <page id="apps" path-info="/([^/]+)/.*" matcher="oxf:perl5-matcher" model="apps/${1}/page-flow.xml"/> Also, might Orbeon Forms' reliance on Yahoo's version of JSON (...\resources\yui\json.js) conflict with Google Translate's version of JSON and related source code? Regards and Thanks, Jim Deegan [hidden email] -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |