Hi,
I just adapt a simple script for my need, and it works, but I have an
error on my page. I don't understand why...
Link to my page: http://www.obiies.com/translation.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml";>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/
>
    <title>Google AJAX Language API - Basic Translation</title>
    <script type="text/javascript" src="http://www.google.com/jsapi";></
script>
    <script type="text/javascript">

    google.load("language", "1");

    function initialize(text,id) {
      google.language.translate(text, "", "fr", function(result) {
        if (!result.error) {
          var container = document.getElementById(id);
          container.innerHTML = result.translation;
        }
      });
    }
    google.setOnLoadCallback(initialize);

    </script>
  </head>

  <body">
    <script language="javascript">
        initialize('Hello World, welcome on this website !','translation');
        initialize('Hallo Wie gehts ?','transl');
        </script>
    <div id="translation"></div>
    <div id="transl"></div>
  </body>
</html>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to