Different language on different posts
BenjaminHoegh opened this issue · 4 comments
BenjaminHoegh commented
Possible to have different language in different posts? So maybe one post exist in English and Chinese, and another one in English and Italy
sunnypp commented
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 %}
joshcummingsdesign commented
@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
joshcummingsdesign commented
@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.