I've produced an internet site, i wish to add localisation with this website - multilingual website. I've produced this using PHP, javascript and ajax.

I'd attempted for google language translator API. Can there be every other method of doing this. Would you please suggest me how you can implement this during my website.

zinigor's idea is useful for you... or consider applying resource bundles in some way in PHP. The second is going to be faster.

It's easy to make use of Google Language API and instead of me publish copies from it here it is best to walk-through a few of the lessons Google provide. It's JavaScript based and connects straight to Google so requirement for code to become downloaded.

However watch out for machine translation. In a few conditions it's fine in other people it may be problematical, inaccurate misleading etc.

Use a tag based approach as recommended and replace the written text quickly with respect to the customers preferences. But that's where it might be interesting. How are you aware what language the consumer wants? Sniff the browser language setting? Request the consumer? Also when you exceed one language you will find the maintenance facet of keeping everything current as well as in sync.

Before starting on localisation you will need to exercise should you really require it and when the expansion and maintenance costs will be paid back.

One solution involves my thoughts - you should use something similar to an interior dictionary. But this can require changing all of your text with special key phrases which will later be instantly transformed into a text inside a corresponding language.

How you can implement it can be you. I've come across one implementation of the system using Smarty. There is a unique function that researched text by keyword from the database, in the template it appeared as if this:

<p></p>

<form action="" method="publish">

    <input type="text" title="hello_world[text]" value="" />

    <input type="submit" title="submit" value="" />

</form>

Whenever a template is be shown, Smarty's internal function will research all of the texts and put them in to the page. Obviously, you'll have to first put all the texts in various languages in to the database.