I am using two languages on my Kirby site: German (default) and English. Works just fine! However, I would like to assign each language to a different domain: .de to German and .com to English. This is when things go wrong:
Both the .de and the .com domain point to the exact same page. German is the default language in both cases. When you switch to English (in the frontend), an “/en” gets added to the URL. Works!
After (when trying to assign the languages to different domains)
Still, both the .de and the .com domain get you to the exact same page. Buuut: Both times in German. When you’re accessing the .de domain and try switching to English, you get forwarded to the .com domain, but everything remains in German. No way out, apparently.
This is how my language files look like:
<?php return [ 'code' => 'en', 'default' => false, 'direction' => 'ltr', 'locale' => 'en_US', 'name' => 'EN', 'url' => 'https://example.com' ];
<?php return [ 'code' => 'de', 'default' => true, 'direction' => 'ltr', 'locale' => 'de_DE', 'name' => 'DE', 'url' => 'https://example.de' ];
Any ideas? Because I have none.
Any clues are much appreciated! Thank you!
PS — One strange detail I’ve noticed on the page as it is now (the “before” stage): When I type in the .de domain (German being the default language), a “/de” gets added to the URL even though it’s not specified in the
de.php (only the
'url' => '/en'.)