Jump to content

Module translation failure


Recommended Posts

Hi there,

 

I have an issue with the translation of theme modules. We are using Prestashop 1.4.7 and have a custom theme.

We wish to run the shop in multiple languages like English and Dutch.

 

We have tried to translate the modules in the BO using Tools > Translations , select module translation and language and then select our theme. After entering the translations and hitting the "Update Translations" button the interface reports a successful update.

 

But the frontend then shows no translations.

 

Inspecting the nl.php file in the theme/mytheme/modules/mymodule directory shows that the file is indeed there but is 0 bytes in size. It has no content.

Returning to the BO and translation pages shows no translations. For the modules in the template they are all gone.

All the other translations work flawlessly.

 

We've tried resolving the issue by:

- setting the permissions to chmod 666 (and tried even 777) but no joy.

- setting force compile

- setting no cache

but still the problem persists.

 

Does anyone recognize this and has a solution to this unwanted behavior?

Link to comment
Share on other sites

This problem typically is due to post_max_size in your php.ini. When you save a translation (i.e. move to the bottom) ps saves complete page, not just the translation you were working with. (hopefully they will change this in the future).

 

So your post exceeds you post_max_size.

 

Change your php.ini to say 32m

or change your .htaccess file by adding:

php_value post_max_size "32M"

Link to comment
Share on other sites

Hi elpatron,

 

Thanks for the tip, I'll keep it in mind.

 

But I'm sorry to say this doesn't seem to work.

 

I've added the php_value post_max_size "32M" to the .htaccess file and tried it with and without the quotes but it didn't help. I'll see if I have access to the php.ini file to see if it'll work better there.

 

Any other ideas perhaps?

Link to comment
Share on other sites

Hi there,

I have the same problem, tried 2 seperate clean installs

And even used 2 different language packs, 1 within installation from ps site

And 1 I found on a forum.

 

Both give me the same error, translation os not saved and I am left with a 0 kb nl.php

In the module directory.

 

Is this a bug in ps? Is the dutch language file failing?

 

I have installed multiple versions of prestashop on the same server all with dutch language.

Never had any problem...

 

Lets hope someone sees this thread and is able to figure it out! I am

Clueless!

 

Best Regards,

Thomas Borkent

Link to comment
Share on other sites

Hi guys,

 

I figured out a solution to the problem.

 

I had decided to make a bug report and during doing this it suggested a possible solution.

 

In the bug report on http://forge.prestashop.com/browse/PSCFI-4808 is mentioned that a similar issue is solved in the SVN version of 1.4.7 SVN 13708.

 

So I went to the SVN 13709 version (which was available) and downloaded the file AdminTranslations.php. See http://svn.prestashop.com/trunk/admin-dev/tabs/AdminTranslations.php for the contents of the file.

 

You can find this file in your prestashop installation in /iadmin/tabs directory. It's responsible for the webpage regarding translations.

 

I then overwrote my existing version with the SVN version of the AdminTranslations.php

 

Instantly solved it. I can now save module translations too.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hi guys,

 

I figured out a solution to the problem.

 

I had decided to make a bug report and during doing this it suggested a possible solution.

 

In the bug report on http://forge.prestas...owse/PSCFI-4808 is mentioned that a similar issue is solved in the SVN version of 1.4.7 SVN 13708.

 

So I went to the SVN 13709 version (which was available) and downloaded the file AdminTranslations.php. See http://svn.prestasho...ranslations.php for the contents of the file.

 

You can find this file in your prestashop installation in /iadmin/tabs directory. It's responsible for the webpage regarding translations.

 

I then overwrote my existing version with the SVN version of the AdminTranslations.php

 

Instantly solved it. I can now save module translations too.

 

Well, it didn't fix my problem. But it does confirm that the issue is with my hosting provider, due to restrictions to changing these values. So either I have to figure out how to manually add Danish texts, or else change providers.

 

By updating with this fix, I now get a nice, coherent message from Prestashop explaining why I can't make any changes to translation. This section won't even open any more due to the server-side restrictions.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Hi guys,

 

I figured out a solution to the problem.

 

I had decided to make a bug report and during doing this it suggested a possible solution.

 

In the bug report on http://forge.prestas...owse/PSCFI-4808 is mentioned that a similar issue is solved in the SVN version of 1.4.7 SVN 13708.

 

So I went to the SVN 13709 version (which was available) and downloaded the file AdminTranslations.php. See http://svn.prestasho...ranslations.php for the contents of the file.

 

You can find this file in your prestashop installation in /iadmin/tabs directory. It's responsible for the webpage regarding translations.

 

I then overwrote my existing version with the SVN version of the AdminTranslations.php

 

Instantly solved it. I can now save module translations too.

 

Hi Jeff67,

I've got the same problem with the template not translating and the fr.php of the moduls not recording and just stating the following:

 

<?php

 

global $_MODULE;

$_MODULE = array();

 

Can I change the AdminTranslations.php on PS 1.3.6.0 or is it just 1.4 and above?

 

Thanks for your help

Mike

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  • 2 months later...
  • 4 weeks later...

I have this same problem and been trying for a while to solve. My Prestashop version is 1.5 and I use Siteground web host.

 

What I tried:

  1. Download the .htaccess from root folder
  2. Adding
    php_value max_input_vars "4000"
    php_value post_max_size "32M"
  3. Save and upload files
  4. It appears 500 - Internal server error

Any suggestion?

Link to comment
Share on other sites

My problem is solved. Here's how. This is the case where you cannot alternate the original php.ini

  1. Try to contact your host technical support about this issue.
  2. If your host does not provide a support, create a file using Notepad, put the following syntax inside "max_input_vars = 10000" (without a Quotation Mark), and save it as php.ini

  3. Next, put this file to the folder you are having trouble.

That's it

 

Furthermore, you can check if max_input_vars value has changed by creating a php file in any of your folder and put the following syntax inside "<?php phpinfo(); ?>" (without a Quotation Mark). Next is to call up this file like you open your index file.

 

For example localhost/testphp.php

Link to comment
Share on other sites

  • 2 months later...

Hello all,

 

Problem solved here (works on 1.2.5 + 1&1) , just posted about it (french) : http://www.prestashop.com/forums/topic/162104-probleme-de-traduction-des-modules/

 

I had tried the who .htaccess thing and got a server error, also tried the method by getting the AdminTranslations from the svn server, same result...none worked except the easy solution I tested and simplified, see link above.

 

Hope it helps.

Link to comment
Share on other sites

  • 2 months later...

I also was able to get this working. Thanks everyone for the comments. After about a day of trying various techniques out here is what solved the problem:

 

1) Create php.ini file with the following:

 

memory_limit = 32M

max_input_vars = 5000

post_max_size = 32M

 

2) place the php.ini file in your prestashop/admin folder

3) verify that the info is correct by placing a phpinfo.php file into the same directory with the following code:

<?php phpinfo(); ?>

4) navigate in your browser to the phpinfo.php file

5) If everything worked then the paramaters should correspond

 

Following this the translations should store on the back end :)

 

Originally I tried changing all of the permissions for my folders this wasn't required once my php.ini was working properly. Make sure that it works with the phpinfo file. Once it works delete the info file.

 

Hope that this helps someone else out :)

Took me almost an entire day, but now it works great.

Link to comment
Share on other sites

  • 4 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...