Fetch pages translated by Google? (PHP)
Posted
by mathon12
on Stack Overflow
See other posts from Stack Overflow
or by mathon12
Published on 2010-04-26T19:28:11Z
Indexed on
2010/04/26
20:23 UTC
Read the original article
Hit count: 270
Hi, I have a bunch of big txt files (game walkthroughs) that I need translating from English to French. My first instinct was to host them on a server and use a PHP script to automate the translation process by doing a file_get_contents() and some URL manipulation to get the translated text. Something like:
http://translate.google.com/translate?hl=fr&sl=en&u=http://mysite.com/faq.txt
I found it poses two problems: 1) there are frames 2) the frame src
values are relative (ie src="/translate_c?....") so nothing loads.
Is there any way to fetch pages translated via Google in PHP (without using their AJAX API as it's really not suitable here)?
© Stack Overflow or respective owner