Jump to content

How .tpl & language files works?


Recommended Posts

Hi ! I am new to Prestashop (1.5.4) and wonder why the texts are included in the code of the tpl file, while there is a lang file ? (I am speaking about the block cart module). If I modify the texts in the .tpl file (either in the main file in /module folder or in my theme/module) , I won't be able tu use the block cart as a multilingual module. I do not understand : I have checked the lang file and it seems to be complete, but the translations strings (to French) are not displayed when positionning the module in a side box. It keeps being English text.

If a lang file was created to enable several languages, I do not see modifying the .tpl file as a valuable soluce. It's a trick, at most.

Can you help me, please ?

Link to comment
Share on other sites

Hello, i moved your post to the new thread.

 

The texts are included into tpl files because it is necessary. I mean that there you can find default language (for prestashop) which is US lang. In language files (en.php / es.php etc) you can find translations for the strings in .tpl files

 

hope it is clear

Link to comment
Share on other sites

Thank you, for the explanation.

Cart module is not translated completely in 1.5.4. From what I've read in the forum, there is a bug : when using an other language than default, for instance only the first 20 strings out of 30 are displayed and used. Some says there is a correction, since it was signaled in the bugtracker, but others say that the correction doesn't do the job.

I was asking about the .tpl file, because some users modified the tpl file to replace the strings with the french translations. I've tried and French was indeed displayed on the site afterwards. But I think it's just a trick and .tpl file should not been modified and should be left with the default language.

For the present being, I have no solution and cannot even begin to configure my prestashop, since translations are at pain.

Would you recommend to start again with a 1.4 stable version ? 1.5 looks a little buggy to the great beginner I am. Sorry if I am unpolite.

Edited by Katryne (see edit history)
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...