tags:

views:

175

answers:

2

Hello, What's the best way to make a website localized to multi languages?

I'm working on a website, and our manager wants it to be like:

http://www.website.com - default to english http://fr.website.com - french http://de.website.com - german

He says it's good for SEO, some developers wants to make it based on cookie and user's accept-language, so the url would always be http://website.com but content would be based on cookie/accept-language.

What you think?

thanks!

A: 

I once heard a teacher of mine say that when he does this, he simple makes php files called "eng.php" "fr.php" and so on...

In these files are associative arrays. The key's are always the same but the translation is different.

Then you need only require the correct language file at the top of you PHP files and if you parse the keys, it'll always be in the correct language.

WebDevHobo
+2  A: 

This article appears to have a good guide to your question: http://www.antezeta.com/blog/domains-seo/

Essentially, they recommend localizing by TLD most, followed by Subdomain, followed by directories

Cookies are a bad idea because Google will not be able to index your localized content.

Gdeglin