Localisation
fmaida opened this issue · 2 comments
If I am not mistaken this theme does not actually support translations. With some minor modifications to the code you could add a "locales" folder and support multiple languages (such as Italian, French, German, ...)
All is needed is to change some passages, such as for example:
<h3 class="subscribe-form-title">Subscribe to ...</h3>
with this special marker:
<h3 class="subscribe-form-title">{{t "Subscribe to"}} ...</h3>
Then, all is needed is to create a "locales" folder and put a json file for each translation. For example:
{
"Subscribe to": "Iscriviti a",
"Back": "Indietro",
"Newer Posts": "Nuovi Articoli",
"of": "di",
"Older Posts": "Vecchi Articoli",
"Page": "Pagina",
}
I don't want to touch any sentence, I just want to wrap them in a marker and create an Italian translation. Then, anyone else will be able to join in and add a new language by just creating a new JSON file in the same way.
My question is: If I'll work on that, would you accept a pull request ?
I think the PR #47 already does that - maybe check it out and let us know your thoughts?
Hey @fmaida, the translation process you've described is correct. And here is a documentation for making any theme translatable which you might find useful.
As for the PR, Editorial is intended to be fairly minimal example of a straightforward theme for beginners. As such we don't intend to increase the complexity here with localization helpers and managing translation files.