MrBrown997 Posted January 9, 2016 Share Posted January 9, 2016 (edited) Hello, hopefully someone can help me on this: Im trying to learn how to program a new module for prestashop. I was searching for tutorials and for me the native prestashop documentation seemed to be the best one. So i started to use this documentation (Documentation) to create a new module form scratch. Now I reached the part, where the translation is described. Somehow I ran into issues following the documentation because when I now go in the backend->localization select Module translation and Core, I see my module and the words that can be translated. But if I try to translate one of those words and klick save, prestashop shows an error. Mainly it says, that prestashop has no write permissions to save this translation. But if I look carefully at this error, it shows the directory, where it tries to save the translation. And somehow this directory is not the one of my module. For core translation it tries to save the translation in aeuc (advancedeucompliance) and for theme translation it tries to save in blockproductlist. Does anyone know, if I have to tell the module in some place, where to save translations? I thought this is part of prestashop and will be done automatically. [Yes, i searched already any Keyword-Search with google and this forum and sorry, but I couldnt find any hint!] Im thankfull for any answer! [Edit: Im using Prestashop 1.6.1.1] Edited January 9, 2016 by MrBrown997 (see edit history) Link to comment Share on other sites More sharing options...
MrBrown997 Posted January 10, 2016 Author Share Posted January 10, 2016 Hey, just wanted to ask if theres really noone who can help me on this? Link to comment Share on other sites More sharing options...
roja45 Posted January 11, 2016 Share Posted January 11, 2016 Did you create the module from scratch or copy another one as a basis? If you can post the contents of your modules: public function __construct() { } function it could help. Cheers Link to comment Share on other sites More sharing options...
MrBrown997 Posted January 11, 2016 Author Share Posted January 11, 2016 Hey roja45, thanks alot for your reply. The module was completely created from scrath using the documentation of PS 1.6. No copy or anything else was made. Here the code you asked for: public function __construct() { $this->name = 'testmodule'; $this->tab = 'front_office_features'; $this->version = '0.1'; $this->author = '#####'; $this->need_instance = 0; $this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_); $this->bootstrap = true; parent::__construct(); $this->displayName = $this->l('Test Module'); $this->description = $this->l('Testmodule.'); $this->confirmUninstall = $this->l('Are you sure you want to uninstall Test Module?'); if (!Configuration::get('testmodule')) $this->warning = $this->l('No name provided'); } Link to comment Share on other sites More sharing options...
roja45 Posted January 11, 2016 Share Posted January 11, 2016 it'll save all the module translation files, not just yours (my guess it those module names you can see are the first ones in the respective directories. Have you checked the permissions? 1 Link to comment Share on other sites More sharing options...
vekia Posted January 12, 2016 Share Posted January 12, 2016 But if I try to translate one of those words and klick save, prestashop shows an error. Mainly it says, that prestashop has no write permissions to save this translation. But if I look carefully at this error, it shows the directory, where it tries to save the translation. And somehow this directory is not the one of my module. For core translation it tries to save the translation in aeuc (advancedeucompliance) and for theme translation it tries to save in blockproductlis if you hit save there - prestashop saves ALL TRANSLATIONS, not only translations related to your module. prestashop saves all translations one by one for each module. so if some of the directories (or translation files like en.php, es.php it.php etc.) will not have writable permissions prestashop will spawn error. 1 Link to comment Share on other sites More sharing options...
MrBrown997 Posted January 14, 2016 Author Share Posted January 14, 2016 Thanks a lot @all. This worked for me. Since I edit my files on my server via ssh mount, the owners of some folders were wrong. Changing these rights, solved the issue! 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