I have a few question about adding localisation to Ghost.
I’m using similar structure like in the default theme Casper where body content is set into default.hbs via referencing {{!< default}} at top of the templates. Would it be possible to set the html lang attribute in the templates as a parameter e.g. {{!< default lang="fi"}} ?
Also, is it possible to add translations to Ghost navigation items, and tags?
Doesn’t really help with the issue. Yes, strings can be translated and posts can be filtered by language tag, but the theme language can only be set from the admin panel, right?
@tzzo yes it can only be changed through the admin so at the end is useless for a multi-lang site. What you can do is “hardcode” the lang html attribute as suggested in the link that @DavidB sent you:
Technically, my understanding is that you cannot set the html lang attribute through a parameter as you needed in your initial post.
Here is another discussion about working with multilang templates (is not exactly what you’re looking for but is another way to work with templates in different languages):
Yeah, seems quite desperate to be honest. So I guess I’ll have to multiple templates of every page that has plain strings, and add html lang attribute programatically…
There are several ways to do this. You don’t have to have multiple templates, you could also implement Tony’s suggestion by passing the value up to a parent template through a block helper.
Nothing desperate about it - docs are just a little sparse atm, will have those fleshed out soon
But… that only works for setting the lang attribute in post page, right? How about e.g. tag and author pages? And is there an other way to localise plain strings than creating different templates?