Hide a blog post in a specific language

Hello!

I have a Kirby blog setup in three different languages, EN, NL and DE.

Some blog posts are written in EN and NL but not in DE.

At that point the DE shows the default EN version, which of course is not wanted.

Is there a simple way to hide the DE version of the blog post since Kirby defaults to the EN language?

Thanks!

@texnixe wrote a tutorial about such a filter: https://www.texniq.de/en/texniq-u/kirby-multilingual-site
With Kirby 2, you could also create a custom collection filter for extra elegance points.

1 Like

I know it’s an old post but I need help for a website in kirby 2 and the texnixe tutorial link is broken. Can you help me?

@Reluma: You can use this custom method to filter by existing files: https://github.com/texnixe/kirby-custom-methods/blob/master/pages-methods/only-translated.php

Note that this doesn’t work for the default language, because the content file for the default language is always created.

For those cases, it is probably best to use a field that marks translations as translated, or use @flokosiol’s plugin: https://github.com/flokosiol/kirby-translations, and then filter by that field.

Great! This plugin is the best solution for me!