"package.json" and locale

I’m a new to Ghost. But my first impression was nice.
Ghost is fast and clean. I have experience with several’s CMS platform all using (python) and (php).
So I start to customise to my country language.
While I translate Casper theme, I saw that some themes templates conditions use option values from ‘package.json’ which are showed in UI. so, it is something to translate. But, jsons files could not receive handlebars translation tags {{t nor (t, because contents must be in between double quotes. I think that one option could be use a lang value direct in package.json , so, could load and select at runtime. Someone has any idea to deal with that problem??

I’ve spent a lot more time with i18next than with Ghost’s theme translation engine. This is what would work for i18next. I’m not 100% sure it’ll work in theme files, but I’d start here.

My guess would be that you could set them up for translation by doing something like {{t @custom.your_custom_value }}, and then adding each possible value of your custom value into the language.json files.

1 Like