How to translate new strings of default theme in PrestaShop 1.7

Your custom theme might contain new strings that are not present in the default theme of PrestaShop. Developers don’t always create translation ready themes, so when you’re buying a premium theme make sure to ask if it’s translation ready. If your theme doesn’t have the language that you want, then you can create the translations yourself.

Follow these few steps to translate your new strings in PrestaShop 1.7.

NOTE : You can only follow this process, If your files are indeed in the theme folder.

1. Use a custom domain for the new strings

For example “Shop.Test”

It must :

    • Start by “Shop”
    • Have 2 levels only. Like “Shop.Test”- “Shop.Test.Contact” won’t work.
    • Not be in CamelCase. Like “Shop.Testtheme”

– “Shop.TestTheme” won’t work.

See below Example :

string-translation-prestashop


2. Now, Export the language zip file from the Back-office.

Go to International > Translations > Export a language and select a language.

translate-prestashop-1.7

This will export language zip file.

For example :

If you’ve chosen Spanish language, It will export file “test.es-ES.zip”.

export-translate-prestashop-1.7


3. Extract the zip file and copy all .xlf file.

Here you will find all .xlf files. Copy that all .xlf file.


4. Paste the all files into the translation folder of your theme.

If necessary, create a folder for the language.

For example:

If you exported the Spanish, you have to add “es-ES” folder in translations folder.

xlf-translate-prestashop-1.7


5. Translate the new strings from the Back-office.

Go to International > Translations > Modify translations.

Select “Themes translation”, your theme, and the language you want to translate.

modify-translate-prestashop-1.7

You will find your domain name in the Shop section, with all your strings of your theme:

replace-translate-prestashop-1.7

Translate your new strings, You can use a simple search to find all of the strings quickly then Click Save to confirm the change to your theme.


6. Then, Export your theme from the Back-office

Once you change the all translations you need, export your theme.

Go to Design > Theme & Logo > Export current theme.

export-theme-translate-prestashop

Your theme is translated!

If you still have any doubts, feel free to ask in comments and we’ll reply as soon as possible.

3 Comments

  1. Helpful. Thanks for sharing.

  2. The post is very useful. Thank you for this useful information.

Leave a Reply

Your email address will not be published. Required fields are marked *