Re: saving the translated html file dynamically to a server-side  
folder: It is possible using XMLHttpRequest to send the file back to  
your server to be saved.  However, the TOU strictly limit the time  
that you may keep that file to no more than fifteen (15) days.  So you  
will have to have a mechanism to delete it after that time.

Re: alternative methods for translating the whole page: What you need  
to look for is a function closure. Essentially, this is a function  
that returns a function.  Using a closure, you can use the same  
function to run the translations, and the callback will remember what  
div to use. For instance, see below:

function runTranslation(el,destLang){
  var myClosure=function(elem){
   return function(result){
    if(result.error){
     // error processing...
    }
    elem.innerHTML=result.translation;
   }
  }
  google.language.translate(el.innerHTML,'',destLang,myClosure(el));
}

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
http://jgeerdes.blogspot.com
http://jgeerdes.wordpress.com
[email protected]

Unless otherwise noted, any price quotes contained within this  
communication are given in US dollars.

If you're in the Des Moines, IA, area, check out Debra Heights  
Wesleyan Church!

And check out my blog, Adventures in Web Development, at 
http://jgeerdes.blogspot.com 
  !


On Apr 1, 2009, at 1:30 AM, shinu thomas wrote:

>
> hi  I am using google language api for translating my web page.i want
> to save that translated html file dynamically in to my foldrer... can
> anybody help me?
>
> i am using div for design my site. so i give id for each div and am
> calling separate java script function for each div...is any other
> method to translate the whole page
>
> >


--~--~---------~--~----~------------~-------~--~----~
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