rOskar Posted November 23, 2018 Share Posted November 23, 2018 Hello! 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: Quote you can copy the templete file in the theme directory like: themes/your_theme/modules/ps_wirepayment/views/templates/hook/payment_return.tpl 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: Quote <file original="modules/ps_wirepayment/views/templates/hook/payment_return.tpl" source-language="en" target-language="pl" datatype="plaintext"> <body> <trans-unit id="b2f40691858b401ed10e62bdf022c705"> <source>Please specify your order reference %s in the bankwire description.</source> <target>Translated %s example.</target> <note>Context: File: modules/ps_wirepayment/views/templates/hook/payment_return.tpl:34</note> </trans-unit> </body> </file> 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. Link to comment Share on other sites More sharing options...
rOskar Posted January 2, 2019 Author Share Posted January 2, 2019 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:http://build.prestashop.com/howtos/translation/how-to-translate-your-theme/ 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: Quote {l s='Translation here' d='Shop.Theme.Mytheme'} I understand this way we can translate themes, not modules. EXAMPLE Module ps_wirepayment - adding any code like this to tpl (modules/ps_wirepayment/views/templates/hook/payment_return.tpl): Quote {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 1.7.4.2. 1 Link to comment Share on other sites More sharing options...
Fatima zahra Posted July 2, 2021 Share Posted July 2, 2021 (edited) There is no solution for translation using theme classic ? Edited July 2, 2021 by Fatima zahra (see edit history) Link to comment Share on other sites More sharing options...
Shunks Posted March 3, 2022 Share Posted March 3, 2022 Any solution?? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now