PrestaShop provides you with a full translation tool for your shop. This helps you add and edit your page translations. This way, you are the master of your shop, and can handle your translated strings without having to wait for official translators to publish their corrections.
Even if you do not want to correct the translators' work, you might want to change the wording they chose to use (less formal, less wordy, etc.), and customize the various available text, thus tailoring your website to your audience; for instance, a hip-hop clothing shop might be better off using different expressions from that of a luxury watches shop.
Internationalization is the first step, where developers choose a mechanism for the translation of the software. All the strings of the software are then converted to make use of this mechanism.
Localization is the second step, where bilingual or multilingual users of the software actually translate the original strings into their own language. Localization may also include providing local data in order to further improve the software for local users.
The PrestaShop team has chosen to use its own built-in translation tool, so that anyone with a PrestaShop installation may customize their shop to their needs.
Modifying a translation
The most important tool of the "Translation" page is in the "Modify translations" section. This is where you can choose to edit a translation, and completely customize each and every sentence if you so wish.
Select the part of the current translation that you wish to edit:
- Front office translations. The text visible to your customers when browsing your store.
- Back office translations. The text visible to you and your team from your store's administration panel.
- Error message translations. The error messages that may appear on your front office.
- Field names translations. The names of the fields in both the front office and back office.
- Module translations. The terms used by the installed modules. Note that modules which are available but not installed will not appear in the tool.
- PDF translations. The terms used in the generated PDF files: invoices, delivery slips, etc.
- Email template translations. The terms used in the default email templates.
Some categories have a second dropdown list, which lists the available themes. PrestaShop themes have their own strings, but can also have their own modules, PDF templates and email templates. The dropdown list therefore enables you to choose which theme you want to work with.
Once you have made your selection, click the flag of the language in which you wish to edit the translation.
A long page then appears. It contains the hundreds of available strings for that category, sometimes split into dozens of field sets.
By default, only the field sets which have untranslated strings are open. If you wish to open them all, click on the button in the top left twice: once to close all of them, once more to expand them all. You can open and close field sets one by one by clicking on their title.
Editing a translation is easy:
Open a field set,
Edit its content,
Click on either the "Save and stay" button to save and keep translating more for this category, or on the "Save" button to save and return to the main "Translations" page.
When you find a string with such a placeholder, it means that PrestaShop will replace it with an actual dynamic value before displaying the translated string.
For instance, in the string "Your order on %s is complete.” %s will be replaced by the shop's name. Therefore you should keep it in your final translation. For instance, in French, the translation would be "Votre commande sur %s a bien été enregistrée."
Technically, having placeholders prevents strings from being split in parts. Thereby, in previous version of PrestaShop, "Your order on %s is complete." would have been split in two: "Your order on" and "is complete.". While the literal translation of these worked for some languages, it made translation impossible for many other languages, especially RTL languages such as Arabic or Hebrew. Thanks to these placeholders, such strings are now fully translatable.
Some fields might have a warning icon to their right. This indicates strings with placeholders. You can click on the icon to get more information.
In case of a string with a placeholder, you should make sure that the content of that placeholder will be placed in the correct flow of the sentence, and avoid literal translation.
Numbered placeholders (%1$s, %2$d, etc.) enable translators to rearrange the order of the placeholders in the string while maintaining the information each is replaced with. This way, a French translator could choose to translate "Order #%1$d from %2$s" as "Commande n°%1$s du %2$s" or "Le %2$s, commande n°%1$s".