Using different domains for each language does not work


#1

As described here:

https://getkirby.com/docs/guide/languages/introduction#using-different-domains-for-each-language

I can not get it to work…

The /content folder is upgraded for kirby3 like 1_ … folder names and the language files and /site/languages are code translated for kirby 3 but if I want to use different URLs by language…it does not work. The debug mode shows also no errors…

Effect is, that I visit http://www.example.com/products and it will redirected me always to the german (default language) site http://www.example.de/produkte

“URL-Key” is also changed to “Slug” …

Cheers Thorsten

Any idea why?


#2

If I call http://www.example.com/products/product-name I also get the Kirby error page in “german”…instead of the english content…the german (default language) url http://www.example.de/produkte/produkt-name works well… only the english translated sites won’t work.


#3

Is language detection enabled?


#4

No! only ‘languages’ => true


#5

I have multipe config files for every domain so there is a config.www.example.com.php file and a config.www.example.de.php files with configurations…(have used that in kirby2)…

Have included

‘language.detect’ => true,
‘languages’ => true

but won’t work

I do not want a automatically language detection…a user have to switch manually to it’s language if he visit my frontend.


#6

I just wanted to make sure it’s not the auto-language detection that is redirecting to the default language…


#7

No that is not set, have give them a test but does not solve my problem so I have delete it from the config file. :slight_smile:


#8

I tested this with Mamp in a fresh K3 Starterkit with two domains and had the same issue with the non-default domain rerouting to the default domain. Might be a bug after all.


#9

Hi texnixe!

I already done it under MAMP as you :slight_smile: Do you put that bug to a bugtracker list so that it can be fixed in one of the upcoming releases for kirby 3?

I also have another issue…

If I will use a more complex array for locale settings like decribed here…

https://getkirby.com/docs/guide/languages/introduction#detailed-locale-settings

Then I get an debug error at:

protected function setLocale(string $locale = null): self


TypeError

Argument 1 passed to Kirby\Cms\Language::setLocale() must be of the type string or null, array given, called in /Applications/MAMP/htdocs/kirbyCMS3/kirby/src/Toolkit/Properties.php on line 82

It seams so that arrays are not supported here under kirby3. But why it is documented above? So it can also be a bug, here. So perhaps, can you try it out please? Or otherwise, let me know how I can fix that issue…

Cheers, Thorsten


#10

Looks like it doesn’t work like in K2 anymore and you have to pass each option separately…

Guess I made a mistake when documenting it because I expected it to work as before… :see_no_evil:


#11

Ok…can you change the docu so that I do the right here…

LC_COLLATE => ‘de_DE.utf8’,

How should I declare each of them separtly?

Thorsten