I have a Drupal 7 website in 18 languages. The main URL is example.com and 18 other international domains are domain aliases of the main URL (example.de, example.fr, example.se, ...).

The Language detection and selection feature in Configuration currently selects the language based on the path of the URL (example.com/de, example.com/se, ...) but not based on the actual URL extention (example.de, example.se, ...).

How can I set the language to Swedish when users visit example.se and to French when visiting example.fr?

Thanks in advance!

Kind regards, Jan


On admin/config/regional/language/configure/url change the Part of the URL that determines language to Domain.

Then set up domains to all languagues: admin/config/regional/language/edit/LANGCODE

  • Works perfectly. I thought that feature was only for subdomains like se.example.com, but appearantly it works for both domains and subdomains. Thank you Gabor! – Jan Werkhoven Sep 28 '12 at 14:27
  • Putting session above URL in the language detection configuration alows for changing the language on example.fr to for example Swedish like so: example.fr?language=se. Drupal rocks! – Jan Werkhoven Sep 28 '12 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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