In a two languages Drupal 7 site, I am using the following order of language detection methods:

  • URL
  • Session
  • User
  • Browser
  • Default

With this order, every time I visit the site as an anonymous user it comes in the default language.

Instead I would like to:

  • display the default language in the first visit.
  • if a language selection is made, display that language in the next visit

Is there a way to achieve this?

  • The problem wit the "best" is that depends only on the needs of the one who's asking.
    – Mołot
    Jan 21, 2014 at 10:43

1 Answer 1


Well I think you are doing just fine, and don't get obsessive over this, it's ok!

the URL thing is the most important and should be always on top, I think session should be second since it can be generated via a request or parameter.

User I'm not sure since mostly users don't pay attention about their language preferences while registering on a webiste.

past these steps the rest doesn't really matter that much, but I'd put Browser the last one since it seems it can vary quite easy with plugins/extensions.

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.