I am using Ghost 4.1.0 self-hosted with the Mapache theme and would like to offer some posts in English while most of the posts are in German (default language).
Therefore I followed this tutorial and restarted Ghost but it works only partially.
On the homepage the language gets set correctly (index.hbs and index-en.hbs seem to work) but on posts it doesn’t set any language: https://www.peleke.de/en/panel-discussion-on-remote-ux-usability-testing/
What did I miss? @DavidDarnes
default.hbs:
<!DOCTYPE html>
<!--
Design by:
——————————
GODO FREDO
✉ https://godofredo.ninja
✎ @GodoFredoNinja
✈ Lima - Perú
-->
<html lang="{{{block "lang"}}}" data-theme="light">
<head>
{{!-- Document Settings --}}
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
{{!-- Base Meta --}}
<title>{{meta_title}}</title>
post.hbs:
{{!-- Layout --}}
{{!< default }}
{{#contentFor "mapache_class_body"}}is-article is-page is-article-single{{/contentFor}}
{{#post}}
{{#has tag="#en"}}
{{#contentFor "lang"}}en{{/contentFor}}
{{else}}
{{#contentFor "lang"}}{{@site.locale}}{{/contentFor}}
{{/has}}
<article class="post u-maxWidth740 u-container u-marginAuto u-marginTop30 u-marginBottom40">
{{!-- Page Title --}}
<h1 class="post-title u-marginBottom20">{{title}}</h1>
{{!-- Post Image - partials/helper/helper-article-image.hbs --}}
{{> "helper/helper-article-image"}}
{{!-- Page Content --}}
<div class="post-body">
<div class="post-inner js-post-content">{{content}}</div>
</div>
</article>
{{/post}}
And what needs to be done to also use the existing en.json translation if lang=en?
Thanks in advance.