Jump to content

Translation changes not reflecting on front end


Dhirender

Recommended Posts

Hi,

 

We have created a small module which displays some information on product page on front. To display, we have used displayLeftColumnProduct hook. Everything is working fine as per our need. But when we change the values in language translation then no changes reflected back on front.

What we have done is given below:

My language is in folder:

modules/mymodule/translations/en.php 

In this file, we written translation as:

$_MODULE['<{mymodule}prestashop>mymodule_md5 of My Text'] = 'My Text';

On front, in displayLeftColumnProduct hook, following is the html in tpl file in which we are displaying our text as:

<p>{l s='My Text' mod='mymodule'}</p>

Now, the point is if we change "My Text" to "Our Text" in language file then no changes reflects on front and is still displaying "My Text" instead of "Our Text".

In mymodule.php file which is reside under "modules/mymodule/" folder, we have echo the translation variable as :

echo $this->l('My Text');

then it displays changed content as "Our Text", but in .tpl file no changes is shown.

 

Can anyone please help us to resolve this problem? If anything we are doing wrong then please tell us the resolution for the same.

 

Waiting for solution

Link to comment
Share on other sites

Not sure offhand what the issue is, can't see any glaring errors

 

I'd have a try changing it through the admin, it might be overriding or not picking up the changes if you just change in the file for some reason. You can find it in localization -> translations

 

If you select Installed Modules and then the language from the list, you should be able to find your module in there, worth a try at least.

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