What's the most efficient way to setup a multi-lingual website

Posted by Jasper De Bruijn on Stack Overflow See other posts from Stack Overflow or by Jasper De Bruijn
Published on 2010-03-24T14:57:01Z Indexed on 2010/04/04 17:23 UTC
Read the original article Hit count: 265

Filed under:
|
|

Hi,

I'm developing a website that will be available in different languages. It is a LAMP (Linux, Apache, MySQL, PHP) setup, and it makes use of Smarty, mostly for the template engine.
The way we currently translate is by a self-written smarty plugin, which will recognize certain tags in the HTML files, and will find the corresponding tag in an earlier defined language file.

The HTML could look as follows:

<p>Hi, welcome to $#gamedesc;!</p>

And the language file could look like this:

gamedesc:Poing 2009$;
welcome:this is another tag$;

Which would then output

<p>Hi, welcome to Poing 2009!</p>


This system is very basic, but it is pretty hard to control, if I f.e. would like to keep track of what has been translated so far, or give certain users the rights to translate only certain tags.
I've been looking at some alternative ways to approach this, by either replacing the text-file with XML files which could store some extra meta-data, or by perhaps storing all the texts in the database, and retrieving it there.
My question is, what would be the best way to make this system both maintainable and perform well with high user-traffic? Are there perhaps any (lightweight) plugins I could take a look at?

© Stack Overflow or respective owner

Related posts about smarty

Related posts about php