Forum Moderators: coopster

Message Too Old, No Replies

Run links via google translator?

ways to parse news links in selected language

         

punisa

9:07 am on Dec 26, 2008 (gmt 0)

10+ Year Member



Hello !

On my site I've built a little sidebar that shows recent news headlines from such sources as CNN, BBC etc.

Is there any way I could make it so that when a user clicks the tile it opens in a new window that is directly parsed through the google translate tool?

So the ending result would immediately be in a let's say German instead of English?

Any clues, ideas are welcome : ))

rockerzz501

9:17 am on Dec 29, 2008 (gmt 0)

10+ Year Member



I think this is possible with PHP but i cannot write you a complete script.

Say the news URL is : www.somenews.com/inenglish , and you would like it to be translated to german.

in your source code, do not still use the url above instead , direct to a php script, for example , it will name as translator1.php

So your hyperlink source code will be:
<a href="www.yoursite.com/translator1.php">News for today</a>

When someone clicks it, it will activate the translator1.php script, the contains Google translator API script that can be found like here;
[labs.involutive.com...]

It then outputs the translated result.