untra / polyglot

:abc: Multilingual and i18n support tool for Jekyll Blogs
https://polyglot.untra.io
MIT License
423 stars 61 forks source link

Feature Request: Allow Disabling of post/page translation for single post/page and exlcude them from other language-sites. #63

Open sweisgerber-dev opened 7 years ago

sweisgerber-dev commented 7 years ago

Add a flag to disable translation / fallback of a specific post or page, so that it only is shown on the language specific pages, but not as foreign language on other sites.

This enables the user to write a post e.g. in lang: de, which doesn't even show up in the post-list of all other languages.

E.g. introduce new frontmatter like: lang-exclusive: <i18n LANGUAGE> keyword that exclusively lists this post on the specific pages with this language, but doesn't list the post on other pages.

---
layout: post
title: Mein Post
lang-exclusive: de
---
Hallo, ich bin der deutsche Post mit dem Titel **"{{ page.title }}"**
heeplr commented 3 years ago

I need this too for posts in language A that haven't been translated to language B, yet but B is the default language. Those posts shouldn't be displayed for language B at all until the translation to B is available.

EDIT: To clarify more: This feature missing is troublesome for pages that have multiple authors in various lingos but (obviously) only one default language.

If we don't translate everything to the default language before publishing, the user of the default language will see a confusing amount of posts in a lot of different languages until the official translation is available for publishing. The only choice left would be, to wait publishing the authors version until the translation is available. It would be much better, to not show the original post to other languages as well.

Even disabling fallback globally would be very helpful.

untra commented 3 years ago

alrighty @heeplr and @sweisgerber-dev ! I just released jekyll-polyglot-1.4.0 , which now has a new frontmatter lang-exclusive: [de] for controlling which site languages get built.

This should help achieve your goals with jekyll site generation.

Cheers!

george-gca commented 9 months ago

I believe this is solved.