Theme translation
Translations are used both when you want to add a new language and when you want to edit current phrases used in the theme.
Editing current phrases used in the theme (Requires theme editing)- You’ll need to open the theme’s
../locales/en.jsonfile in your code editor. - Change the sentences used in the theme following the pattern:
{
"Old translate": "New translate",
...
}
- After making your changes, save your file, compress the theme into a zip format, and upload it to Ghost.
- Inside the
../locales/folder, add target language file for examplees.jsonfor Spanish andpl.jsonfor Polish (a valid language code must be used). - Based on the translation from the
en.jsonfile, add translations for your language in your code editor. For example, for Spanish, use in thees.jsonfile:
{
"Back": "Volver",
"Newer Posts": "Artículos Siguientes",
"Older Posts": "Artículos Anteriores",
...
}
- After making your changes, save your file, compress the theme into a zip format, and upload it to Ghost.
- Then, go to the 'Publication language' settings in the Ghost Admin.
- Enter the correct language code into the 'Site language' field.
- Click 'Save' to activate.
Type at least 2 characters to search