Showing posts with label blog. Show all posts
Showing posts with label blog. Show all posts

Saturday, 14 April 2012

How to translate your web page using Google Translate tool


Google provides several useful tools to translate your web page. Then you can offer your page contents in more than sixty languages!

Our goal is to provide a drop down list where user will select target language and then the page will "automagically" translate into the desired language.

Translated page will appear in the same top window frame so not to distort your web page design layout.

Drop down list will show or hide depending on user browser default language.



USING GOOGLE TRANSLATE TOOL

Procedure to translate a web page is simple:

We will request a web page to Google Translate server, and it will return our web page already translated!


Request will have following structure:

http://www.google.com/translate_c?langpair=LANG1|LANG2&u=URL

where:
LANG1 is set to original language
LANG2 is set to target language
URL is the url we want to translate.


This is the same way as going to http://translate.google.com/?hl=en web page, and pasting there our URL web page.

NOTE: Google also offers to us this other tool: http://translate.google.com/translate_tools?hl=en but it introduces some problems maintaining the original formatting of the web page.



SELECTOR WITH LANGUAGE OPTIONS