PHP Trasnlate HTML page using google translate

Posted by John Jones on Stack Overflow See other posts from Stack Overflow or by John Jones
Published on 2010-05-07T13:23:59Z Indexed on 2010/05/07 13:28 UTC
Read the original article Hit count: 374

Filed under:
|

Afternoon,

Bit of a tricky question this one, I have a website and need to translate the pages into french, I am using google translate API to do the translation. What I am doing is loading in the HTML templates into a string using PHP and then need to translate the text copy on the pages and then save as for example:

fr_master_header.html
de_master_header.html

The problem I have is identifying the text copy on the page ignoring the HTML, replacing the copy in the extact place and then saving the file with the HTML tags and trasnlated text copy.

Cheers in advanced.

© Stack Overflow or respective owner

Related posts about php

Related posts about google-translate