Jump to content

Prestashop rewrite translations with default language


Recommended Posts

Hi,

 

I have problém with my Prestashop 1.6.1.1 with translations. And the problem is that when I want to save my translation second language which in my case is english then every english translation is rewrite with default language in my case czech. So I am not able to translate my shop. When I upload language file to my theme manually and then go to translations page to translate something and save it then all english is rewrite.

Can you someone help me with this?

 

Thanks

 

Michal

Link to comment
Share on other sites

I solve this problem by modifying translate.php file. I just modify function getModuleTranslation() and instead of 

 

$language = Context::getContext()->language;

 

I add

 

        if(isset($_GET['lang']) AND $_GET['controller']=='AdminTranslations'){
            $language_iso = $_GET['lang'];
            $language_id = Language::getIdByIso($language_iso);
            $language = new Language($language_id);
        }else{
            $language = Context::getContext()->language;
        }
 
And now it is working.
Link to comment
Share on other sites

×
×
  • Create New...