Multi-Lingual Site, Single-Language Blog Articles

Setting up a multi-lingual site for the first time. Most pages in the site should be displayed in two languages (English, Dutch), except for the blog articles. Each article is going to be written in their own language, without translation. So, when viewing the Blog page in English, we will see only the English articles, and if we switch the language, we should see only the Dutch article list.

I’m struggling to set this up in the Panel. It seems that once we add additional languages, every page is ‘translatable’ by default, and there is no way to “switch it off”. Also, when a new page is added, it is always created in the default language, and there doesn’t seem to be a way to specify a different ‘default language’ on the template, either…

I’m guessing that this must be a fairly common use-case for multi-lingual sites that have blogs, so I was wondering whether there is a known solution, or perhaps something obvious that I’ve missed?.. Any guidance and suggestions would be appreciated.

Kirby is “default-language first” by design (as @distantnative put it yesterday on Slack when we were discussing how to make this clearer for the editor in the page create dialog). So yes, every page is always created in the default language first and there is no way around it.

In the frontend, you can filter pages to make sure you only display those that have translations in the given language. You can facilitate this by adding a field or using different templates for the languages.

As regards preventing translations, there is no way to do this at them moment, apart from educating users, I think. Here again, using different templates or something like this could be of help.

Yes, the use case is fairly common, but it is also fairly common that the default language page must exist.

Thank you for the quick feedback, @texnixe! Indeed, I can see the reasoning behind having pages automatically created in the default language.

I think I may have found an elegant workaround, using the (very handy) Panel View Extended plugin. I’ll document it here, in case it’s useful for anyone else.

  1. Create 2 ‘article’ blueprints, one for each language: “Article - English”, and “Article - Dutch” in my case. The blueprints are going to be exactly the same, except that the field labels will be different in each blueprint (translated according to the language).
  2. In the panel, if needed we can create separate Page sections to list and manage our ‘English’ and ‘Dutch’ articles separately - we can separate them by using the template: option in the Pages section.
  3. When we click on an article to edit it in the Panel, however, we still see the ‘language’ dropdown - which will be confusing for the user. All we need to do here is to hide the language menu when the user is editing an article. To do that, we instal the Panel View Extended plugin, and use the singleLanguage: true option in our article blueprints.
  4. In our Blog template, we can easily filter the articles we need to show by using filterBy() with the ‘template’ option.

The experience in the Panel is pretty smooth for the user. I hope this proves useful for others!

1 Like

Yes, that is along the lines of what I was thinking as well, and sounds very useful.

I’d probably disable language settings via the Panel (just in case).

@luxlogica what is the purpose of the additional language field? If you have different templates, you don’t really need that and filtering by template should actually be faster then by field? Or am I missing something?

Totally right, @texnixe! The flag is redundant - I’ll adjust the notes above to match.