Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Blog and translations

Solved by pamtbaau View solution

Started by Klaas 3 years ago · 2 replies · 379 views
3 years ago

Hi,

I'm setting up a blog page. Blog posts can be in English or in Dutch, but not all posts are available in both languages. So some folders only have the .en.md and some others only have the .nl.md files

On the "overview" page for English, I only see items that are in English.
On the "overview" page for Dutch, I see both English and Dutch entries.
I think this is because English is the fallback language - if an item is missing in Dutch, any English version is shown instead.

How can I fix that?
I've tried an empty .en.md file, but that seems to confuse Grav even more.
I've tried making a "proper" file for English and set it to "published: false" following a 2016 forum post, but that doesn't work (it is still in the overview, and the forum post has no "solved").

best regards and tanks for your help,
Klaas

3 years ago Solution

@KlaasHDec, Have you had a chance to read the docs? Especially about content_fallback in section Language Configuration?

3 years ago

There is reading, and then there is reading and understanding.

YAML
  content_fallback:
    en: ['en']
    nl: ['nl']

seems to do it.

Thank you very much,
Klaas

👍 1
last edited 07/26/23 by pamtbaau

Suggested topics

Topic Participants Replies Views Activity
Support · by Paul Hodges, 4 weeks ago
19 485 5 days ago
Support · by Lauw, 7 days ago
2 101 7 days ago
Support · by Anna, 3 weeks ago
4 426 1 week ago
Support · by gtx, 4 weeks ago
4 377 3 weeks ago
Support · by Anna, 1 month ago
9 484 3 weeks ago