When setting up a multilingual site, Kirby routes the homepage to the main language, e. g. / routes to /de if German is the default. Following the guides at Multi-language | Kirby CMS, I can set up the url for a language to be root. This perfectly serves my default language at / but also removes the language id from all subsequent urls.
Is there a way to tell Kirby to serve the homepage in the default language at the root / directly, while still keeping the language id in the other pages urls? Like / for the German homepage but /de/projekte and /en/projects for the localized project pages.
Yes, exactly. That wasn’t possible in Kirby 2 without rerouting, either.
@nilshoerrmann, @mrflix What are your reasons for having the code anywhere but not on the homepage? If you use the language code to provide more information to users, it would make sense on the homepage as well.
I like the idea of having language codes for all languages because the user directly sees in the URL that this is localised content. But I don’t like the idea of having hananils.de/de which is just doubling the language code. (I know this is still the case for links to subpages but to me the context is different.)
But I have to say that this problem not very important to me. So I’m not going to “work against Kirby” here to force my own URL concept. The two possible schemes follow a logical concept, so that’s fine.
Well, maybe it doesn’t look so cool for de domains (it doesn’t really duplicate the language code), but this is more a cosmetic problem which you can solve with routes if you really need to.
Yes, exactly. I just edited my comment above and added:
But I have to say that this problem not very important to me. So I’m not going to “work against Kirby” here to force my own URL concept. The two possible schemes follow a logical concept, so that’s fine.