Jump to content

Module translation disabled by SL.php


Recommended Posts

Hi!


I'm translating the Specials module (blockspecials). I go to

Back Office > Translations > Module translations


and enter the correct translation.


I should see "Akcije" instead of "Specials", but I don't, unless I delete this file:

/myshop.com/themes/mytheme/modules/blockspecials/sl.php




When I delete this file, the translation becomes active. The trouble is that everytime I enter translation in Back Office, these sl.php files are generated.

Any idea what I'm doing wrong?


Thanks!

Link to comment
Share on other sites

It is normal for that file to be generated. That is how PrestaShop stores module translations. What is weird is being able to create translations, but not modify them. What permissions does the file have? Your server might not be giving the file enough permissions for PrestaShop to modify it.

Link to comment
Share on other sites

I'm developing on my localhost (Windows 7+ Apache 2.2). The files have correct permissons, AFAIK.

Is it correct that the contents of SL.php is alwas only this?

<?php

global $_MODULE;
$_MODULE = array();



I see that every module has this kind of files (en.php, sl.php, de.php).

I tried translating my "blockuserinfo" module, but the same problem appears.
Once I enter my translations using BackOffice, a SL.php file is generated and translations in BO are ignored.
When I delete the SL.php file, translations from BO appear fine.

Weird?! (:

Link to comment
Share on other sites

Yes, you are quite right!

I've got 2 SL.php files actually:

/myshop.com/modules/blockspecials/sl.php


and

/myshop.com/themes/mytheme/modules/blockspecials/sl.php



The first file actually contains the translations I entered - everything is fine there.
The second file (in my theme folder) is empty and I guess it overrides the first file.

Can I get around this by not deleting the sl.php files everytime I add translations?

Link to comment
Share on other sites

Hi!

No, the translation are actually under "Module translation".

The trouble seems to be that I copy every module from /modules/ to my own theme folder (theme/mytheme/modules/).
I do that because I modify .TPL files in certain modules.

Is that the correct way of developing my own theme or should I just change the files directly under /modules/ folder in the root of prestashop installation?

Link to comment
Share on other sites

Since each theme has its own translation file that overrides the module translations, I expected it to be in "Front Office Translations". If it's not there, I'm not sure where else it would be. I guess you will have to manually edit the file.

Link to comment
Share on other sites

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...