This is the way to do it
- In the Back Office, go to Tools and Translations
- Select where the translation is to be made, usually in a Module or the Front Office, and click the flag of the country whose language you want to translate to
- Click Expand all fieldsets and search for the phrase you want to translate
- Enter the translation and click Update Translations
What this does is add the translated phrase(s) to a file called xx.php where xx is the ISO-Code of the country (where it is located depends on what you have translated).
It is also (I guess) possible to edit that file directly but I wouldn't recommend it.
OK, that's not too hard, but what if I want to add some text and translate that?
Lets say we want to add the text "This is a test shop, please do not order anything" to all product pages.
- Go to the themes directory (themes/prestashop by default) and edit the file product.tpl
- Enter this where you want the text to appear {l s='This is a test shop, please do not order anything'}
- Then follow the steps above and you will see that the phrase has popped up to be translated in the Back Office
{l s='This is a text to be shown in a module' mod='xxx'}
If you forget about the mod='xxx', the phrase will show up to be translated in the Back Office, but the translated phrase will never show up in the shop.
If you want to change a text, I'd advise you not to change it in the code but instead use the translation tool and translate from English to English.
No comments:
Post a Comment