I was planning of making my CMS and frontend of a website multilingual. I've thought of using a variable in the url like &lang=en
I used a session variable to keep this setting. The header script gets the variable from the session and loads a list of constants.
Is it a good method? is there any other method? How does this affect search engines?
Multilingual pages with PHP
Moderator: General Moderators
Re: Multilingual pages with PHP
do not use session - the url have to include the language. What will happen if I share the URL which do not contain the lang code. My friends will see it in the default language instead of the one we're using.
And it's not good for SEO
it's best to use URLs like domain.com/lang-code/rest-of-the-url
And it's not good for SEO
it's best to use URLs like domain.com/lang-code/rest-of-the-url
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: Multilingual pages with PHP
Don't forget about $_SERVER['HTTP_ACCEPT_LANGUAGE'].
Re: Multilingual pages with PHP
I believe Smarty is pretty good at multilingual support.
- MindOverBody
- Forum Commoner
- Posts: 96
- Joined: Fri Aug 06, 2010 9:01 pm
- Location: Osijek, Croatia
Re: Multilingual pages with PHP
Use Zend_Translate