I want to set up a site with multiple languages. Default language is English and right now there are four other languages, with the possibility to add new languages in the future. The URL’s will be site.com for default English, site.com/nl for Dutch, site.com/de for German etc…
The site has a blog, each blog in each language should have the possibility to show translated/localized blog content and also unique content, not visible for the other languages. In the future blog writers will be using the admin to create blog posts.
Right now I’ve set up Grav this way: I show an overview of blog posts on the homepage. I followed the tutorial in the Learn section of this site, so it’s set up like this.
The current situation is: there should always be a default English item.en.md file where ‘published’ is set to false if you want to publish a German specific post (which is set to ‘published’ true). By setting the English version to false the other languages will not publish this post either. If I remove the English file and keep the German file published, then all the other languages will include it in the overview, which should not be the case.
What I want is that I only have to create the language specific post (item.de.md), without having to create the default language version. The other languages of the site should not show the other language based post in their overview.
So what is the best way to do this, or is this currently not possible?
Currently the option is the one you use, put published: false in the english version. If using Admin, maybe this should be taken into account as a possible workflow if multilang is enabled, and you’re creating a new page in a language != the default language
Alright, thanks for your reply. So what if I want to publish a blog post only for the English language? Since English is the default language and a fallback for the other languages, I have to create the same blog post for the other languages and then for each manually have to set it to ‘published: false’. This seems a bit excessive to me. To make it worse, if at a later time I add another language to the site I need to go through all of the English posts again and create a version of these posts with published set to false for this new language.
Maybe this is impossible to build, I don’t have enough insights about this, but Is there possibly a way to reverse the above scenario? So make it possible to not fallback for an individual post? Something like this:
If fallback is set to true, all languages will show this markdown file in it’s original fallback language.
If fallback is set to false: all other languages outside of the default language will not show this markdown file.
Though it will not help with translating the blog posts, for the site strings translation part, I think it’s a good idea to use the localization platform https://poeditor.com
It makes the localization process a lot tidier and helps automate many aspects of it.