octopress / multilingual

Write elegant multi-language Jekyll sites
MIT License
69 stars 15 forks source link

Multilingual pages #2

Closed drallgood closed 9 years ago

drallgood commented 9 years ago

Most sites will not only have posts in multiple languages but also pages.

Aside from the two use-cases we already covered for posts (i.e. cross-posts), pages can also be not language specific at all, e.g. to allow your users to choose their language.

imathis commented 9 years ago

@drallgood I assume that for language specific pages, users will place them under the language directory. For site-wide pages, they would just leave them outside of that directory. Currently Octopress's new command supports the --lang option for both pages and posts. Since people don't typically work with the site.pages array like they do for posts, is there some feature that I could add for pages beyond this?

imathis commented 9 years ago

I've just added a {% post_lang %} liquid block tag that makes handling the site.posts loop even easier. Check out the updated docs and let me know what you think.

drallgood commented 9 years ago

I have to give it a try, but so far everything looks like it should work just fine :)

I'll keep you posted.

imathis commented 9 years ago

I've just released an update, 0.0.3, and I've changed the post_lang tag set_lang and it also temporarily sets the site.lang setting. I've updated the docs on that considerably, so take a look again if you like.

drallgood commented 9 years ago

Looks good.

One question, though. Shouldn't it be {endset_lang} instead of {endpost_lang}?

imathis commented 9 years ago

Thanks, that was a typo. Fixed!

imathis commented 9 years ago

Aside from dictionary translation (which I'm still considering) are there any multilingual page features you can suggest? I'm not sure if this ticket has a direction.

drallgood commented 9 years ago

Nope. I think, with what you've already implemented and the dictionary translation we've covered everything I can think of.

This ticket really has no direction :smile:

imathis commented 9 years ago

Awesome, thanks for all your help!