JET-Dev Posted November 8, 2012 Share Posted November 8, 2012 Dear forum, I can't find any way to translate the phrase Pay with card or Paypal account in checkout? I can't find it in BO translate section i also tried with the xml translation file. I'm using PayPal module 3.2.5 Anyone who has done this? Best regards, 2 Link to comment Share on other sites More sharing options...
Nazik Posted November 21, 2012 Share Posted November 21, 2012 Can't find the solution either, looking for help for several days. Link to comment Share on other sites More sharing options...
palohrabak Posted November 28, 2012 Share Posted November 28, 2012 I had the same problem with my PrestaShop 1.5.2 and PayPal module 3.3. I've translated almost everything to Slovak language but the problematic text stayed in English. I've solved this problem by manual editing the file \modules\paypal\translations.xml where the source of the text is saved. The strange thing was that the text displayed on my eshop was loaded from <country iso_code="RE"> part of the file (and I have Slovak and English languages enabled in my front office). Probably you will have the same strange behaviour of your PayPal module. So if you want to translate the text, just replace the blue text in translations.xml file in this section: ... <country iso_code="RE"> <yes>Yes</yes> <no>No</no> <payment_choice>Pay with your card or your PayPal account</payment_choice> <leader>Leader in</leader> <online_payment>online payments</online_payment> ... If it does not help, you will need to try other languages in this file. Anyway, someone should fix this bug so that it can be translated in back office. 6 Link to comment Share on other sites More sharing options...
xaa Posted December 7, 2012 Share Posted December 7, 2012 I've the same pb on PS1.5.2 with paypal 3.4. My shop is available in 3 languages (EN,FR,NL) payment button is not translated :/ Link to comment Share on other sites More sharing options...
activex Posted January 8, 2013 Share Posted January 8, 2013 Same problem here, PS 1.5.3, any fixes yet? Link to comment Share on other sites More sharing options...
El Patron Posted January 8, 2013 Share Posted January 8, 2013 I've the same pb on PS1.5.2 with paypal 3.4. My shop is available in 3 languages (EN,FR,NL) payment button is not translated :/ did you follow the suggestion above? http://www.prestashop.com/forums/index.php?/topic/201446-translate-pay-with-card-or-paypal-account/page__view__findpost__p__1022764 Link to comment Share on other sites More sharing options...
iggywebprom Posted January 16, 2013 Share Posted January 16, 2013 (edited) I have 3 languages so the above option doesn't work, it's based on customer country. I don't want it to be dependant on country, but on site language instead. I just have made this text translatable on /modules/paypal/views/templates/front/express_checkout/paypal.tpl {l s='$PayPal_content.payment_choice' mod='paypal'} and added needed translations to paypal module from translations admin. Remember to update also English translation. Hope they'll fix it in a next upgrade. Edited January 16, 2013 by iggywebprom (see edit history) Link to comment Share on other sites More sharing options...
thomascharbit Posted January 23, 2013 Share Posted January 23, 2013 i personally edited the paypal module so that it takes the current user language instead of the default language : in paypal_abstract.php private function loadLangDefault() { $paypal_country_default = (int)Configuration::get('PAYPAL_COUNTRY_DEFAULT'); $this->default_country = ($paypal_country_default ? (int)$paypal_country_default : (int)Configuration::get('PS_COUNTRY_DEFAULT')); $this->iso_code = $this->getCountryDependency(strtoupper($this->context->language->iso_code)); } Then it will use its own translations in translations.xml Maybe iggywebprom solution is better if you want to keep your translations in Prestashop 3 Link to comment Share on other sites More sharing options...
mgobbi Posted January 30, 2013 Share Posted January 30, 2013 in paypal_abstract.php This file doesn't exist anymore (module version 3.4.4). Same edit but different file name: "paypal.php", works great! Thank you! Link to comment Share on other sites More sharing options...
Kogkalidis Posted January 30, 2013 Share Posted January 30, 2013 I've the same pb on PS1.5.2 with paypal 3.4. My shop is available in 3 languages (EN,FR,NL) payment button is not translated :/ Site of belgium, right? Link to comment Share on other sites More sharing options...
chanansh Posted May 25, 2013 Share Posted May 25, 2013 Do you have a solution for the newest prestashop version? (I mean iggywebprom's solution aka {l s='$PayPal_content.payment_choice' mod='paypal'} ). It seems like the file modules/paypal/views/templates/front/express_checkout/paypal.tpl is not here anymore... I have only views/template/front/order-confirmation-mobile.tpl, order-confirmation.tpl, order-summary.tpl do you know where should I put the patch for making this annoying msg translated? Link to comment Share on other sites More sharing options...
Amazzing Posted August 31, 2013 Share Posted August 31, 2013 Another solution that worked for me: 1) find this file: \modules\paypal\views\templates\hook\express_checkout_payment.tpl 2) create an override here: \themes\yourtheme\modules\paypal\express_checkout_payment.tpl 3) go to line 36 and comment out this part {$PayPal_content.payment_choice}, then add a translatable text: {l s='Your translation here' mod='paypal'} PS 1.5.4.1 PayPal 3.5.7 3 Link to comment Share on other sites More sharing options...
androkot33 Posted August 31, 2013 Share Posted August 31, 2013 Found this function in /modules/paypal/paypal.php file: public function getTranslations() { $file = dirname(__FILE__).'/'._PAYPAL_TRANSLATIONS_XML_; if (file_exists($file)) { $xml = simplexml_load_file($file); if (isset($xml) && $xml) { $index = -1; $content = $default = array(); while (isset($xml->country[++$index])) { $country = $xml->country[$index]; $country_iso = $country->attributes()->iso_code; if (($this->iso_code != 'default') && ($country_iso == $this->iso_code)) $content = (array)$country; elseif ($country_iso == 'default') $default = (array)$country; } $content += $default; $this->context->smarty->assign('PayPal_content', $content); return true; } } return false; Maybe bug is here ? Link to comment Share on other sites More sharing options...
piataseverineana Posted May 9, 2014 Share Posted May 9, 2014 Another solution that worked for me: 1) find this file: \modules\paypal\views\templates\hook\express_checkout_payment.tpl 2) create an override here: \themes\yourtheme\modules\paypal\express_checkout_payment.tpl 3) go to line 36 and comment out this part {$PayPal_content.payment_choice}, then add a translatable text: {l s='Your translation here' mod='paypal'} PS 1.5.4.1 PayPal 3.5.7 Thank's. That work's for Prestashop 1.5.6.2 and Paypal 3.6.8 too. Link to comment Share on other sites More sharing options...
Innar.Hunt Posted June 11, 2014 Share Posted June 11, 2014 Thank's. That work's for Prestashop 1.5.6.2 and Paypal 3.6.8 too. Works for PS 1.6.0 and PayPal 3.7 Link to comment Share on other sites More sharing options...
JensenDalgaard Posted September 4, 2014 Share Posted September 4, 2014 Another solution that worked for me: 1) find this file: \modules\paypal\views\templates\hook\express_checkout_payment.tpl 2) create an override here: \themes\yourtheme\modules\paypal\express_checkout_payment.tpl 3) go to line 36 and comment out this part {$PayPal_content.payment_choice}, then add a translatable text: {l s='Your translation here' mod='paypal'} PS 1.5.4.1 PayPal 3.5.7 Could someone please explain what an "override" is? Thanks BeMike Link to comment Share on other sites More sharing options...
NicholasMora Posted September 23, 2014 Share Posted September 23, 2014 I had the same problem with my PrestaShop 1.5.2 and PayPal module 3.3. I've translated almost everything to Slovak language but the problematic text stayed in English. I've solved this problem by manual editing the file \modules\paypal\translations.xml where the source of the text is saved. The strange thing was that the text displayed on my eshop was loaded from <country iso_code="RE"> part of the file (and I have Slovak and English languages enabled in my front office). Probably you will have the same strange behaviour of your PayPal module. So if you want to translate the text, just replace the blue text in translations.xml file in this section: ... <country iso_code="RE"> <yes>Yes</yes> <no>No</no> <payment_choice>Pay with your card or your PayPal account</payment_choice> <leader>Leader in</leader> <online_payment>online payments</online_payment> ... If it does not help, you will need to try other languages in this file. Anyway, someone should fix this bug so that it can be translated in back office. Thanks! This worked for me. Its strange, find iso_code="RE" and translate there. Im using prestashop 1.6.0.9 and PayPal module 3.7.2 2 Link to comment Share on other sites More sharing options...
JensenDalgaard Posted September 23, 2014 Share Posted September 23, 2014 It works! It works! Thanks a lot - I has taken months to find this - And now it works. I translated all the languages in the file with "search and find" - And now it it in Danish. Thank you Link to comment Share on other sites More sharing options...
lettersets Posted November 18, 2014 Share Posted November 18, 2014 For Prestashop 1.4.7Find file modules>paypal>views>template>hook>express_checkout_payment.tplReplace line 65: {$PayPal_content.payment_choice} by:{l s='$PayPal_content.payment_choice' mod='paypal'}Force compile and then edit translations in BO (Tools>Translations>Module translations)(search for "$PayPal_content.payment_choice" and also edit EN language) Link to comment Share on other sites More sharing options...
Nick Lappage Posted December 17, 2014 Share Posted December 17, 2014 (edited) Hi, I wanted to try the override translation method for the PayPal phrase "Pay with your card or your PayPal account", but it doesn't seem to work the with latest version of the European PayPal module (version 3.8.1). I'm currently using PS 1.5.6.2. Am I doing something wrong? I can get the phrase to appear in the translations module and translate to any language, but it doesn't translate to the Checkout page. In fact the only phrase that appears is in the PayPal "public_html/shop/modules/paypal/translations.xml" file So here's what I've done... I copied "express_checkout_payment.tpl" (as described in previous comments) to "public_html/shop/themes/mytheme/modules/paypal" and then changed the code at lines 35 to 40 from {if isset($logos.LocalPayPalHorizontalSolutionPP) && $PayPal_payment_method == $PayPal_integral} <img src="{$logos.LocalPayPalHorizontalSolutionPP|escape:'htmlall':'UTF-8'}" alt="{$PayPal_content.payment_choice|escape:'htmlall':'UTF-8'}" height="48px" /> {else} <img src="{$logos.LocalPayPalLogoMedium|escape:'htmlall':'UTF-8'}" alt="{$PayPal_content.payment_choice|escape:'htmlall':'UTF-8'}" /> {/if} {$PayPal_content.payment_choice} {/if} to {if isset($logos.LocalPayPalHorizontalSolutionPP) && $PayPal_payment_method == $PayPal_integral} <img src="{$logos.LocalPayPalHorizontalSolutionPP|escape:'htmlall':'UTF-8'}" alt="{!-- $PayPal_content.payment_choice --!l s='Pay with your credit card or PayPal account.' mod='paypal'|escape:'htmlall':'UTF-8'}" height="48px" /> {else} <img src="{$logos.LocalPayPalLogoMedium|escape:'htmlall':'UTF-8'}" alt="{$PayPal_content.payment_choice|escape:'htmlall':'UTF-8'}" /> {/if} {$PayPal_content.payment_choice} {/if} Should there be more? Anything else I seem to change in the same way within this file causes the checkout page to not display. Many thanks for reading, Nick Update: 19th December 2014 - Actually the best solution for me was to use the method posted today by Fandal at this post http://www.prestashop.com/forums/topic/331542-paypal-translate-pay-with-your-card-or-your-paypal-account/?do=findComment&comment=1903466 Edited December 19, 2014 by Nick Lappage (see edit history) Link to comment Share on other sites More sharing options...
c930586 Posted January 20, 2015 Share Posted January 20, 2015 Hi, Works for PS 1.6.0 and PayPal 3.7 It works with 1.6.11 and PayPal 3.8.1 You have to comment out {$PayPal_content.payment_choice} twice in the override .tpl, in lines 36 and 65 more or less, and add {l s='Pay with your card or your PayPal account' mod='paypal'} twice as well, like this: {*$PayPal_content.payment_choice*}{l s='Pay with your card or your PayPal account' mod='paypal'} Then, the new string 'Pay with your card or your PayPal account' will be translatable, and it will show nicely in the checkout. R 1 Link to comment Share on other sites More sharing options...
Matia.info Posted March 17, 2015 Share Posted March 17, 2015 i personally edited the paypal module so that it takes the current user language instead of the default language : in paypal_abstract.php private function loadLangDefault() { $paypal_country_default = (int)Configuration::get('PAYPAL_COUNTRY_DEFAULT'); $this->default_country = ($paypal_country_default ? (int)$paypal_country_default : (int)Configuration::get('PS_COUNTRY_DEFAULT')); $this->iso_code = $this->getCountryDependency(strtoupper($this->context->language->iso_code)); } Then it will use its own translations in translations.xml Maybe iggywebprom solution is better if you want to keep your translations in Prestashop This is the original code in Paypal.php but what did you change it to? Link to comment Share on other sites More sharing options...
Matia.info Posted March 17, 2015 Share Posted March 17, 2015 Hi, It works with 1.6.11 and PayPal 3.8.1 You have to comment out {$PayPal_content.payment_choice} twice in the override .tpl, in lines 36 and 65 more or less, and add {l s='Pay with your card or your PayPal account' mod='paypal'} twice as well, like this: {*$PayPal_content.payment_choice*} {l s='Pay with your card or your PayPal account' mod='paypal'} Then, the new string 'Pay with your card or your PayPal account' will be translatable, and it will show nicely in the checkout. R Works great for PS 1.6.0.14, only the file you have to edit in this version is: modules/paypal/views/templates/hook/express_checkout_payment.tpl Link to comment Share on other sites More sharing options...
amandloren Posted November 22, 2015 Share Posted November 22, 2015 Hi, thank you, I solved my problem. I confirm the soluce of Matia.info : only the file you have to edit in this version is: modules/paypal/views/templates/hook/express_checkout_payment.tpl It's ok for PS 1.6.1.2 Regards Link to comment Share on other sites More sharing options...
INFOIT Posted May 11, 2016 Share Posted May 11, 2016 i personally edited the paypal module so that it takes the current user language instead of the default language : in paypal_abstract.php private function loadLangDefault() { $paypal_country_default = (int)Configuration::get('PAYPAL_COUNTRY_DEFAULT'); $this->default_country = ($paypal_country_default ? (int)$paypal_country_default : (int)Configuration::get('PS_COUNTRY_DEFAULT')); $this->iso_code = $this->getCountryDependency(strtoupper($this->context->language->iso_code)); } Hello, This works on 1.6.1.5. latest ) The text i correct, but i dont have a real picture of Paypal logo, but just ?? ... What can do...maybe who know how to change logo there ? Thank you Tadej 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