I'm currently working on a project where the website has two languages, Dutch and English. I've set up my root index.php to have Dutch set as default language and an index.php in /en/ is pointing it to the English website.

My ExpressionEngine version is v2.10.1.

I'm not sure where to start from here. My main questions are:

  • How do I determine the user's location to be outside The Netherlands?
  • How do I keep the language switcher intact (preventing endless redirects).

Thanks in advance.

1 Answer 1


Depends how you're managing languages in your EE build (e.g. Transcribe, Publisher, hand-rolled).

Either way, it will be cookie or session based, dropping a variable that states you've automatically taken them somewhere and not to do it again. Best method is using the Session add-on.

Detecting the users location via IP will probably require GeoIP or IPGeo.

But fundamentally please consider your users!!! It's very bad for you to assume that you know what they want. I'm English and and work in Holland, I follow a link to the English website but you're going to force me to the Dutch website - WTF?!? The Googlebot, is happy to crawl and index your website, but everytime it tries to start it's crawl from the Dutch homepage it gets forced to the English website because it's based in the US! This does have massive implications to SEO performance. Here's a slideshow from a presentation regarding the SEO issues of internationalization that may help (alas there wasn't a video of it).

A couple of other posts on Stack Exchange that may help:

Redirect multi language site based on IP address

how can I redirect a homepage depending on the browser language settings


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.