Multilingual nondefault page

What is the right way to have “only” non-default language page on the multilingual web?
I know there must be a default so what about the sitemap, menu, content etc.?

Thanks for your suggestions

If I understand you correctly, you want to prevent Kirby from falling back to the default language if content in the non-default language is missing, right?

If that is the case, you have to tell Kirby to filter stuff to only use non-default language pages.

You can use a custom pages method like this here: https://github.com/texnixe/kirby-custom-methods/blob/master/pages-methods/only-translated.php

I’m not sure I totally understand your question. Can you clarify? What are you trying to do?

Google has some advice for multilingual sitemaps.

  1. When I create non-default page in Panel Kirby also create default page with same Title - I understand it has some technical reasons - is it really technically impossible for flat systems?
  2. I need to mark an existing page as non-existent - difficult for the client to understand :slight_smile:
  3. I need to adjust language switching - for now I’m redirecting to the homepage (what is your recommendation?)
  4. All sitemap plugins counted with the solution when the default language exists and the other pages are translated - in sitemap should not be a page to which there are language alternatives. So how to hide default page for crawlers…
  5. The default page should ideally return 404, not the content of the non-default language version.

It is at least how Kirby currently works. If you use the Panel and create a page in a non-default language, the default language is created.

Well, yes, that is the result of 1. Since the page exists, there is no automatic way that Kirby could know that is shouldn’t exist.

First of all, I wouldn’t show a link to the other version if the page only exists in one version. However, since the link still exists, I’d probably redirect to the error page rather than the home page.

Edit: I know this is all not ideal for non-standard use cases, and the team is aware of it. I think the multi language feature will be thought new in a future version of Kirby. For the moment, though, I’m afraid we have to live with what we have.

I can highly recommend the Translations plugin by @flokosiol for multilang site.

2 Likes