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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Blog and translations

Solved by pamtbaau View solution

Started by Klaas 3 years ago · 2 replies · 252 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 Thomas, 1 week ago
3 90 2 hours ago
Support · by Anna, 3 days ago
2 92 22 hours ago
Support · by Justin Young, 23 hours ago
1 40 23 hours ago
Support · by Duc , 1 week ago
2 98 6 days ago
Support · by Colin Hume, 1 week ago
2 90 6 days ago