Andrej Stas Posted January 23, 2017 Share Posted January 23, 2017 (edited) How do you prepare your modules for translations? Here's the problem: This is the new 1.7 way how we should insert all texts in TPL files in our new PS 1.7 modules: {l s='Thank you for your purchase!' d='Modules.Ptm_Paypal.Shop'} And in .PHP files: $this->displayName = $this->trans('Payments by Paypal', array(), 'Modules.Ptm_Paypal.Admin'); This solution is recommended by Prestashop, even used in some of their modules (for example ps_customtext) So what is the problem? It doesn't work! No text strings are detected for translation in the back office! So the other option is to fall back to the former way, that is not recommended: {l s='Thank you for your purchase!' mod='ptm_paypal’} (TPL) $this->displayName = $this->l('Payments by Paypal'); (PHP) And this one works, although it is deprecated. What are your ideas? Especially if Prestashop developers read this forum - it should be amongst the TOP bugs to fix. Edited January 26, 2017 by Andrej Stas (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 23, 2017 Share Posted January 23, 2017 i've got the same problem. moreover - no matter what method i will use im not able to find these strings in back office translations feature. 1 Link to comment Share on other sites More sharing options...
Andrej Stas Posted January 24, 2017 Author Share Posted January 24, 2017 i've got the same problem. moreover - no matter what method i will use im not able to find these strings in back office translations feature. I see, so the problem is not only within our team. I will report the bug on forge.prestashop.com if it hasn't been already done. Link to comment Share on other sites More sharing options...
eleazar Posted January 24, 2017 Share Posted January 24, 2017 Never mind. Currently it seems that not even the PrestaShop team really knows how to handle this. Core developer Maxim Biloé for instance prefers mixed solutions. https://github.com/PrestaShop/PrestaShop/commit/a58a150 Link to comment Share on other sites More sharing options...
Xavier Borderie Posted January 24, 2017 Share Posted January 24, 2017 Hey guys! I need to update the doc about this, but to make it short, the new 1.7 way does not work for module. Module developers need to use the 1.6 way. More details here http://build.prestashop.com/news/new-translation-system-prestashop-17/ (specifically: https://github.com/PrestaShop/prestashop.github.io/commit/9dd32c7ceeb7a6664e64cf6e42ffdae5b8ff6a7c ) Doc will be updated this week. Link to comment Share on other sites More sharing options...
Andrej Stas Posted January 26, 2017 Author Share Posted January 26, 2017 Hey guys! I need to update the doc about this, but to make it short, the new 1.7 way does not work for module. Module developers need to use the 1.6 way. More details here http://build.prestashop.com/news/new-translation-system-prestashop-17/ (specifically: https://github.com/PrestaShop/prestashop.github.io/commit/9dd32c7ceeb7a6664e64cf6e42ffdae5b8ff6a7c ) Doc will be updated this week. Hi Xavier, thank you for the update! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now