Set the language on individual posts
Back in August, Pagecord added multi-language support so you could set a default language for your entire blog. This was great for non-English blogs, but some people blog in more than one language.
Now you can set the language of individual posts, so your blog can contain posts in multiple languages!
How it works
When creating or editing a post, in the drop-down menu you'll find a new Set Language option. Click this to display a language selector that allows you to choose from the supported languages. Once set, the language for that post will be reflected in the HTML, e.g:
<html lang="es">
Posts without a specific language set will continue to use your blog's default language.
Filtering posts by language on Pages
This new post language setting allows you to filter posts by language using dynamic variables on your pages. To do this, use the new lang option. This example will render only Spanish posts.
{{ posts | lang: es }}If you filter by your blog's default language, it will also include posts that don't have a specific language set – those are assumed to be in the default language.
There's quite a number of Pagecord users who write in more than one language, so hopefully this is a useful addition for your blog!