The following explains how to translate a PrestaShop module, in this case our Affiliates Pro for PrestaShop.
1. Adding a Language – Import a Localization Pack
Unless you haven’t already imported the localization pack for your country and its language, you need to do that in order to be able to translate the module.
Adding a new language is done by simply importing the localization pack from a country which uses that language.
In the PrestaShop back office, go to Localization > Localization, in the section IMPORT A LOCALIZATION PACK select the country for which to import the content, make sure that the Languages option is checked among others.
Click Import and wait until the page has finished loading. You should get the message Localization pack imported successfully. and can now proceed to the actual translation work.
Read more about localization in PrestaShop here Localization.
2. Translate the Module
In the PrestaShop back office, go to Localization > Translations.
Now you must choose what you are going to translate in the section MODIFY TRANSLATIONS:
– In the field Type of translation select Installed modules translations
– For the field Select your theme select Core (no theme selected)
– Under Select your language choose your desired language
Now click the Modify button.
On the page that follows go to the section Module affiliatesprops where you will be able to introduce your translations for Affiliates Pro for PrestaShop. You will see that there are several subsections which correspond to different aspects of the module, some related to the Back Office and some to the Front End presented to visitors.
Input the corresponding translations in the fields provided and use the Save and Stay button while you continue to work on your translations. You should do that often to avoid loss of translations.
If you translate our module to your language and want to contribute your translations, please let us know by sending an email to support at itthinx dot com and we can include it in the next update.
Read more about translations in PrestaShop here Translations.
It’s possible that you get this message while trying to access the translations:
Warning! Your PHP configuration limits the maximum number of fields allowed in a form
1000 for max_input_vars.
Please ask your hosting provider to increase this limit to 2317 at least, or you will have to edit the translation files.
If that happens, you will need to adjust the value of PHP’s
max_input_vars. Basically there are two options,
.htaccess (for Apache) and
php.ini – if that sounds completely strange, you should ask your webmaster or hosting provider for help.
In your site’s
adminXXX subfolder add a
.htaccess file containing the following line:
php_value max_input_vars 10000
If you have trouble when trying to save the translations (test it before introducing lots of translations), you might also want to consider adding entries for
upload_max_filesize as shown below for
Add the file
php.ini to your site’s administration subfolder
max_input_vars = 10000
upload_max_filesize = 64M
post_max_size = 65M
Well that’s about it. Translating modules in PrestaShop is really easy using the facilities that are already built in. If you have questions or suggestions, feel free to comment.