kurtsson / jekyll-multiple-languages-plugin

I18n support for Jekyll and Octopress
MIT License
925 stars 202 forks source link

Default language not applying translation for a page #110

Open alvarotrigo opened 6 years ago

alvarotrigo commented 6 years ago

I've created a folder called pages outside _posts. In the root directory. This way I would expect the files inside pages to be created as folders in the _site folder.

For example:

page/demo.html

Should create:

_site/demo/index.html _site/es/demo/index.html

Consider that enis the default language and es the secondary one, as defined in the config.ymlfile:

languages: ["es", "en"]

What I found is that both files are created (_site/demo/index.html and _site/es/demo/index.html) but only one of them, the one in the es folder contains the translated text. The other one doesn't even contain any text that is suppose to be translated.

The file page/demo.html contains the following

Demo {% translate pages.test %}

And the _i18n folder contains two files, en.yml and es.yml both containing:

pages:
  test: this is a test

What is going on? Why the content of the default language is not being translated at all?

alvarotrigo commented 6 years ago

The only option I found to solve it is creating a dummy default language, then i would get the one I would like as default in the en folder with the translated text. But this seems to be some kind of bug... the default language doesn't seem to be working at all.