Jump to content

Prestashop 1.5 pdf translation problems


Recommended Posts

Hello!

 

I have problems translating PDF in prestashop version 1.5.2.

I'm trying this on my web server and on local server with fresh install.

When I try to save PDF translation it shows completely blank page. And it didn't show any error messages.

So any suggestions for solution?

 

P.S other section translations work fine.

Edited by Artizzz (see edit history)
Link to comment
Share on other sites

I find out that it's trying to save translations on folder themes/default/pdf/lang (instead of orginal location translations/(lanugage iso code/pdf.php), and if I create file named in format (language iso code).php it saves translation on that file. But when it saves it didn't use it from that file.

Link to comment
Share on other sites

If your problem is not related to permissions, then (as of 1.5.2.0) :

 

1. backup.

2. edit /controllers/admin/AdminTranslationsController.php line 1158-1168

replace "$this->writeTranslationFile();" with $this->writeTranslationFile(true); and viceversa, so the block looks like :

 

else if (Tools::isSubmit('submitTranslationsPdf'))
 {
   if ($this->tabAccess['edit'] === '1')
   // Only the PrestaShop team should write the translations into the _PS_TRANSLATIONS_DIR_
   if (($this->theme_selected == self::DEFAULT_THEME_NAME) && _PS_MODE_DEV_)
 $this->writeTranslationFile(true); //THIS _WAS_ WITHOUT TRUE -MUST BE WITH
   else
 $this->writeTranslationFile(); //REMOVE TRUE FROM HERE
  else
   $this->errors[] = Tools::displayError('You do not have permission to edit here.');
 }

 

3. IMPORTANT - Delete "/themes/default/pdf" folder itself.

 

Should work now ;)

 

P.S. If you need help with your shop - ping us - we can help you at low cost ;)

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

Hi,

 

I have the same problem but for the Module section translations. After modifying I press save and a blank page without error appears. The modifications seem to be saved although.

 

Can somebody help me out with this problem?

 

Thank you!

Link to comment
Share on other sites

  • 1 month later...
×
×
  • Create New...