views:

65

answers:

3

I would like to deploy a webpage in different languages (German and English). As a backend solution I would use Wordpress running on a nginx/PHP/MySQL stack on Linux.

From various posts here I think that looking at the browser locale (the ACCEPT-LANGUAGE field in HTTP request) is a good first try for setting the correct language. Of course the user will be able to override this and this choice will be stored in a cookie.

So my questions is:

How would one implement that in wordpress? Would one have to deploy two separate wordpress installations one for each language or is there some plugin for it which I have not found yet.

A: 

I suggest you to use the standard localization tool gettext. AFAIK there is a PHP binding for it, so it may be not that difficult. (I've already seen some themes which handles i18n this way).

Edit: This is no solution, how to select the right content language in wordpress, but since I don't use worpress myself, I can't give you an answer for this part.

FUZxxl
This sounds a bit complicated for a web page. For an application it is definitely worth considering.
GorillaPatch
A: 

@GorillaPatch,

See this question on WordPress Answers on how to add language support to your WordPress theme using the .mo and .po files.

Chris_O
+1  A: 

You can use the plugin "WPML". Pretty sure that will do what you want.

Darren
Thanks, that's exactly what I needed, and welcome to stackoverflow.com
GorillaPatch