I just finished the customers website and now they want to have different languages.
Currently, the contents of sites are stored in tables in MySQL db:
pages: seotitle, seodesc, smallHtml, fullHtml
Products: ID, seotitle, seodesc, smallHtml, fullHtml
I thought a good way to do this would be to have an extra table:
Then change the page and product table to:
So, I would use a query like
SELECT * FROM pages WHERE slug = '$slug' AND language='$language'
$language cookie ?
$language
, , SEO. URL- /pages.php?slug=page-slug. mod_rewrite /pages/page-slug.
/pages.php?slug=page-slug
/pages/page-slug
, /pages.php?slug=page-slug&code=languagecode /pages/page-slug/languagecode. .
/pages.php?slug=page-slug&code=languagecode
/pages/page-slug/languagecode
- ?
- , , , , .
.
/////
http://en.kioskea.net/faq/596-change-the-language-of-your-website , URL-, Google
, , , , , .
- ( ) , , ISO , . English = ru .. URL- en.websitename.com. , - , URL-, , , www.websitename.com, fr.websitename.com. , , , URL- . URL- SEO, .
, , ( , ). - (. ). , , ( ) , , , , /.
SEO: . .
Google , URL-, , :
Google , URL- .
: HTTP Content-Language, lang , .
lang
-, - (. PHP); (. HTTP).
URI - . , URI ( ).
URI , . .