Is it possible to get a specific translation via helpers?

I do know how translation with the “{{t}}” helper works. For my template I would like also to be able to retrieve a specific translation (e.g. the German one). Is that possible?

Background

I would like to make my Ghost blog to support multiple languages with English as the default language. I would like to also write some posts in German. Therefore, I created the internal tag #German.

I have two locales files: de.json and en.json. Within my theme I do this currently:

<p class="share-buttons-heading">{{#has tag="#german"}}Teile diesen Beitrag{{else}}{{t "Share this"}}{{/has}}:</p>

“Teile diesen Beitrag” is the German translation (same as in locales/de.json).

Rather than having the German translation hard-coded within the theme, I would like to get it from the de.json directly? Is there a way to achieve this with Ghost helpers or something similar?

2 Likes

I am also interested about this.
I have been looking Ghost core code for days, I still can’t figure out.
It seems to be also very difficult to add other custom data, which could be accessed with helpers without modifying the core.
I guess I either need to make a lot of duplicate templates and use many routers or just accept that Ghost is not really multilingual friendly.