Open BenjaminHoegh opened 6 years ago
I second this idea.
Is there a way to hide "Change language link" if the post for that language doesn't exist?
Now I am using:
{% for lang in site.languages %}
<a href="{{ site.baseurl_root }}/{{ lang }}{{ page.url }}" >{% t langs.{{ lang }} %}</a>
{% endfor %}
@BenjaminHoegh Am I mistaken in thinking this is already possible? For example, you can have a directory structure like this:
_i18n
├── en
│ └── _posts
│ └── hello.md
│ └── world-en-only.md
├── en.yml
├── es
│ └── _posts
│ └── hello.md
└── es.yml
@sunnypp Wouldn't that be the same principle as above? If the post doesn't exist in the target language, it falls back to the default language.
See also #72 ((blog) posts is a collection, I think)
Possible to have different language in different posts? So maybe one post exist in English and Chinese, and another one in English and Italy