0

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

1 Answer 1

1

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

2
  • 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! Sep 28, 2012 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! Sep 28, 2012 at 14:37

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.