Jump to content

Custom translations

Recommended Posts


What is the best and easiest way to make custom, new translations?
I found information that if You want to translate missing lines of module, it is good way to:


you can copy the templete file in the theme directory like:


And then change the domain for all strings, instead of {l s="My string" mod="ps_bankwire"} use something like {l s="My string" d="Modules.Wirepayment.Shop"}

You will then be able to translate all strings as part of your theme (International -> Translations -> Theme)

I changed this line in my tpl, but translation did not show at BO translations. Do i have to reload translations somehow, to make it appear? Whenever I edit file app/resources/translations/pl-PL/ModulesWirepaymentShop.pl-PL and put at the end:


  <file original="modules/ps_wirepayment/views/templates/hook/payment_return.tpl" source-language="en" target-language="pl" datatype="plaintext">
      <trans-unit id="b2f40691858b401ed10e62bdf022c705">
        <source>Please specify your order reference %s in the bankwire description.</source>
        <target>Translated %s example.</target>
File: modules/ps_wirepayment/views/templates/hook/payment_return.tpl:34</note>

And replace it via FTP - shop crashes and there is error 500. Translating payment_return.tpl is just example, I would like to know how to add new translations at any place of my shop.




Share this post

Link to post
Share on other sites

I think it was not working, because I put manually code to app/resources/translations/pl-PL/ModulesWirepaymentShop.pl-PL file. My problem was partially solved by exporting language from translation page - as point 2 in "case 2" at below page:

In fact, case 2 is working fine for theme files, such as themes/x/templates/catalog/product.tpl. But it is not working when I put for example this code to tpl of any module:


{l s='Translation here' d='Shop.Theme.Mytheme'}

I understand this way we can translate themes, not modules.

Module ps_wirepayment - adding any code like this to tpl (modules/ps_wirepayment/views/templates/hook/payment_return.tpl):


{l s='My custom translation for module' d='Modules.Wirepayment.Shop'}

is not working - translation is not showing at BO and we can not see new line of text at front. I followed many articles about this issue but noone seems to work. Wirepayment module is just example, there is problem with others too. Prestashop

  • Like 1

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More