Welcome Guest, Not a member yet? Register   Sign In
Internationalisation, Clean URLs and Google page ranking.
#6

[eluser]benjamincurrie[/eluser]
The above library looks great and while not trying to devalue the author's work, I'll post another solution I came up with for anyone else interested.
I had a project that required multi-lingual support with translated URL's, eg:
mysite.com/home (home page in English)
mysite.com/accueil (home page in French)

For those who take SEO seriously, having a URL that uses your keywords is a big deal and my employer at the time wanted the keywords in the URL for every language.

This does require a config file to keep track of controller and function translations, for those who don’t wish to maintain translations it reverts to URL’s like this:
mysite.com/fr/home

There is also an option to use a query string:
mysite.com/home?lang=fr

I’ve put the project up on Github and would love some feedback as I have only tested in my own environments so far. Feel free to fork the project and implement your own methods, hopefully we can get a fairly expansive library happenning together.

https://github.com/benjamincurrie/CodeIg...age-Switch

A lot of people seem to want to use cookies for storing user language preference, however I don’t believe this is the best practice for search engine crawlers. Will eventually get to supporting this method too (as well as subdomain).

Ben


Messages In This Thread
Internationalisation, Clean URLs and Google page ranking. - by El Forum - 02-05-2012, 09:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB