Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Different language on different posts #115

Open
BenjaminHoegh opened this issue Apr 16, 2018 · 4 comments
Open

Different language on different posts #115

BenjaminHoegh opened this issue Apr 16, 2018 · 4 comments

Comments

@BenjaminHoegh
Copy link

BenjaminHoegh commented Apr 16, 2018

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
Copy link

sunnypp commented Aug 19, 2018

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
Copy link
Contributor

joshcummingsdesign commented Dec 4, 2018

@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
Copy link
Contributor

joshcummingsdesign commented Dec 4, 2018

@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.

@keunes
Copy link

keunes commented Nov 10, 2021

See also #72 ((blog) posts is a collection, I think)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants