This is a tutorial for Prestashop 1.7 translation to explain how to translate the front office of transformer prestashop theme and panda prestashop theme in Prestashop 1.7.
Prestashop 1.7 got improved a lot based on Prestashop 1.6. The new translation system is one of best new features. The new translation system uses domains to identify strings, merges repeated strings to one, which saves a lot of time. Transformer theme v3 and Panda theme v1 for Prestashop 1.6 have more than 6000 strings, most of them are repeated strings, it's boring to translate repeated strings. In Transformer theme v4 and Panda theme v2 for Prestashop 1.7, there are only about 300 strings, which is a very good news for all prestashop 1.7 users.
Let's use the home page of transformer theme v4 as an example, click here to open it to help you understand this tutorial. This tutorial also works for panda theme, if you are using Panda theme, replace all "transformer"s with "panda"s.
Front office strings can be divided to 3 groups: Prestashop's native strings, Strings stored in database and Theme strings. Let's talk about them one by one.
1. Prestashop's native strings.
Like "Add to cart", "Quick view", they are from files in the /themes/transformer/ folder, not the /themes/classic/ folder, all themes share those strings.
How to trasnslate Prestashop's native strings.
In most case, you don't need to translate them, they've been translated. You can import & update them via the "ADD / UPDATE A LANGUAGE" section on the "BO>International>Translation" page.
2. Strings stored in database.
This can be divided to 2 sub-groups.
- Strings from PrestaShop's native feature, like: product names, category names.
- Strings from theme modules, like: custom link group titles, custom content blocks. For example the "Help" link on the top right corner, it's from the Custom links module, the "ABOUT US" section on the footer, it's from the Advanced custom content block module.
How to translate strings stored in database.
If you have more than one language added in your store, then there will be a language switcher after every multi-language field to translate them, see screenshot.
Here are some strings, you may don't know where to fine them.
- Welcome message. It's in the theme editor module.
- Copyright text. It's in the theme editor module.
- "Help" on the top right corner. It's in the Custom link module.
3. Theme strings.
Theme strings are strings you need to translate if you can't find existed translation on Transformer theme's Crowdin project. Transformer theme has about 300 theme strings, they can also be divided to 2 sub-groups. All themes strings are under the "Theme > Shop > Transformer" domain, no matter which groups they are in.
- Strings from files in the /themes/transformer/, like: the "View all reviews" tooltip which shows out when mouse over ratings, it's from the \themes\transformer\templates\catalog\_partials\miniatures\rating-box.tpl field.
- Strings from transformer theme's modules, like: "FEATURED PRODUCTS", "NEWSLETTER".
How to translation theme strings?
You have two ways to translate them.
1. Translate on Crowdin (Recommended)
3 benefit of doing translation on crowdin.
- Crowdin is a professional translation platform, you would feel enjoy doing translation work on it.
- Stop repeated work, once a translation is ready, all users can get it for free.
- Team work, we can work together.
Thanks for all participates on crowdin.
2. Translate using the prestashop 1.7's translate system on the back office.
Click here to see How to translate Transformer theme v4 on the back office.
Click here to see How to translate panda theme v2 on the back office.
Please don't select "Module translations", slect "Theme translations" to translate theme strings. All strings from modules showing on the front office are theme strings. This is a common mistake, so I pointed it our here. See screenshot blow.
FAQs
Why can't I save translations in Prestashop 1.7?
I got success messages after clicking the "Save" button, but after refreshing the page, strings remained the same as before? This is also a cache problem, click the "Reset" button along with the file, and try again.
Why I got "No translation file" error ?
That's probably due to .xlf translation files missing. (1) Prestashop's .xlf translation files are missing, try re-importing translation packages. (2) Your theme's .xlf translation files are missing. Download translation files from Crowdin or using the "Translation files generator" module to re-generate files.
Do I need to translate other domains on the "Theme translations" section ?
Generally, you don't need to translate other domains, because they have already been translated, you can down translations from Prestashop, and then import translations to your site. If you are running on your site on Transformer theme, then just care the "Shop > Theme > Transformer" section.
After I translate all words, but they can't word on front office ?
That's probably a cache-related problem, try clearing the Smarty cache and removing all files in /app/cache/prod/translations folder.
How to use the prestashop's translation system to modify strings?
For example if you want to change the title of top sellers slide block, you just need to search its title. You may get several results, the one under shop > theme > panda domain is what you are looking, your changes to it will be shown on the front office.
We will create more posts to introduce how to translate strings on the back office.
Related articles
Prestashop 1.7's translation system