Welcome Guest, Not a member yet? Register   Sign In
Handling languages
#1

[eluser]Thomas Edwards[/eluser]
I’m working on a new job Web site which’ll be in Welsh and English. There’s a couple of things that I can’t get my head around, so thought I’d share and see if anybody has a solution.

At first I set the language to be changed and saved in the session. Default is English, but they can switch to Welsh. We might include French or German in the future, so it needs to be scalable. CI does a great job of handling the languages and it works well – but, what about Google? If Google follows /lang/set/cy-gb (setting it to Welsh) then the site will then appear to be in Welsh to Google, or does Google not accept cookies when it’s crawling? Otherwise, it’ll record half the site in English and the other half in Welsh, depending on when it got to the switch language link. Solution to that is to only allow languages changes from POST data – but then can Google handle that?

When you send a link to someone, and you see it in Welsh, it’ll appear in English on their computer. Solution is to have the language in the URL, but that’s a right pain to have it hanging about on every single page – and a bit complicated for CodeIgniter too (put everything in a _remap()?!)

Does anybody know any sites that handle multiple languages well?
#2

[eluser]umefarooq[/eluser]
hi try this multi language library to create multi lang site in CI i have build multi lang site English and Arabic using this library

CI multi lang

just give it try if you find any problem post your problem here.
#3

[eluser]tonanbarbarian[/eluser]
you can always stop google from indexing the /lang/set/cy-gb link so that it cannot index the site in welsh

another option is to use a very simple addition to the url to determine the language
i.e. mysite.com/en/controller/model... is the english link to any part of the site and mysite.com/cy/controller/model is the welsh link to the same page.

how would you do this?
- you could do a url rewrite in .htaccess to move the en or cy from the start to somewhere else in the url
- you could have each language as a folder on the site with the CI index.php in each and then have CI determine the language later on (in the controller for example)

have not tried either of these examples so not 100% sure they will work




Theme © iAndrew 2016 - Forum software by © MyBB