Jump to content

[SOLVED] Translate Paypal in checkout


Recommended Posts

what is your ISO country code in admin? SE?

 

If yes I didn't saw the translation for modules/paypal/translations.xml

 

to add it, open the file and after:

<contents>

 

add:

<country iso_code="SE">
 <yes>Yes</yes>
 <no>No</no>
 <payment_choice>MY TRANSLATION FOR: Pay with your card or your PayPal account</payment_choice>
 <leader>Leader in</leader>
 <online_payment>online payments</online_payment>
 <tagline>Easy, secure, fast payments for your buyers.</tagline>
 <expectations>Getting started with PayPal only takes 5 minutes</expectations>
 <benefits>
  <![CDATA[
   <li><span class="bold">Get more buyers</span><br />100 million-plus PayPal accounts worldwide</li>
   <li><span class="bold">Access international buyers</span><br />190 countries, 25 currencies</li>
   <li><span class="bold">Reassure your buyers</span><br />Buyers don’t need to share their private data</li>
   <li><span class="bold">Accept all major payment method</span></li>
  ]]>
 </benefits>
 <your_country>Your country</your_country>
 <change_country>change</change_country>
 <country_change_title>Select your country</country_change_title>
 <customer_support><![CDATA[<span style="font-weight: bold">Need help ?</span>]]> Give us a call : xxxx</customer_support>
 <customer_support_image>call</customer_support_image>
 <support_foonote></support_foonote>
 <paypal_account>You already have a PayPal business account</paypal_account>
 <select_solution>Select your solution</select_solution>
 <learn_more><![CDATA[<a href="https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=1" target="_blank">Learn more</a>]]></learn_more>
 <sole_solution_section_title>Need PayPal to process all your card payments ?</sole_solution_section_title>
 <additional_solution_tagline>Need PayPal in addition to your existing card processor ?</additional_solution_tagline>
 <choose>Choose</choose>
 <website_payment_standard>Website Payments Standard</website_payment_standard>
 <website_payment_standard_tagline>
  Start accepting payments immediately.<![CDATA[<br />]]>
  No subscription fees, pay only when you get paid.
 </website_payment_standard_tagline>
 <website_payment_pro>Website Payments Pro</website_payment_pro>
 <website_payment_pro_tagline>
  A professional platform to accept payments through credit cards and PayPal account, covered by seller protection.<![CDATA[<br />]]>
  Customized payments pages. Monthly subscription of 25€.
 </website_payment_pro_tagline>
 <website_payment_pro_disclaimer>Click on the SAVE button only when PayPal has approved your subscription for this product. This process can take up to 3-5 days.</website_payment_pro_disclaimer>
 <express_checkout>Express Checkout</express_checkout>
 <express_checkout_tagline>Boost your online sales by 30%*.</express_checkout_tagline>
 <express_checkout_tagline_source>*Source: Forrester research realized in march 2011</express_checkout_tagline_source>
 <account_section_title>Apply or open your PayPal Business account</account_section_title>
 <credentials_section_title>Enable your online shop to process payments</credentials_section_title>
 <credentials_tagline>Give your PayPal Identification info, finish to set-up your account and start accepting payments</credentials_tagline>
 <credentials_description>Communicate your PayPal identification info to PrestaShop</credentials_description>
    <credentials_integral_description>Indicate the email you used when you signed up for a PayPal Business account</credentials_integral_description>
 <credentials_button>Get my PayPal identification info</credentials_button>
 <credentials_button_disclaimer>After clicking on the “Get my PayPal identification info” button, enter your login and password in the pop up, copy your PayPal identification info from the pop up and paste them is the below fields.</credentials_button_disclaimer>
 <credentials_username>API username</credentials_username>
 <credentials_password>API password</credentials_password>
 <credentials_signature>API signature</credentials_signature>
 <credentials_business_email>API business e-mail</credentials_business_email>
 <credentials_fields_disclaimer>Please check once more that you pasted all the characters.</credentials_fields_disclaimer>
 <setup_finalize_title>To finalize setting up your PayPal account, you need to</setup_finalize_title>
 <setup_reminder_1>Confirm your email address : check the email sent by PayPal when you created your account</setup_reminder_1>
 <setup_reminder_2>Link your PayPal account to a bank account or a credit card : log into your PayPal account and go to “My business setup”</setup_reminder_2>
 <configuration_options_title>Configuration options</configuration_options_title>
 <express_checkout_shortcut_title>Use express checkout shortcut</express_checkout_shortcut_title>
 <express_checkout_shortcut_tagline>Offer your customers a 2-click payment option</express_checkout_shortcut_tagline>
 <sandbox_title>Use Sand box</sandbox_title>
 <sandbox_recommended>(recommanded)</sandbox_recommended>
 <sandbox_tagline>Activate a test environment in your PayPal account (only if you are a developer).</sandbox_tagline>
 <sandbox_learn_more>Learn more</sandbox_learn_more>
 <sandbox_learn_more_link>https://developer.paypal.com/</sandbox_learn_more_link>
 <sandbox_live_mode>Live mode</sandbox_live_mode>
 <sandbox_test_mode>Test mode</sandbox_test_mode>
 <sandbox_confirmation_title>Activating the test mode implies that</sandbox_confirmation_title>
 <sandbox_confirmation_content>
  <![CDATA[
   <li>You won’t be able to accept payment</li>
   <li>You will need to come back to the PayPal module page in order to complete the Step 3 before going live.</li>
   <li>You’ll need to create an account on the PayPal sandbox site (<a href="https://developer.paypal.com/" target="_blank">learn more</a>)</li>
   <li>You’ll need programming skills</li>
  ]]>
 </sandbox_confirmation_content>
 <sandbox_confirmation_question>Are you sure you want to activate the test mode ?</sandbox_confirmation_question>
 <payment_type_title>Payment type</payment_type_title>
 <payment_type_tagline>Choose your way of processing payments (automatically vs.manual authorization).</payment_type_tagline>
 <payment_type_direct>Direct sales (recommended)</payment_type_direct>
 <payment_type_manual>Authorization/Manual capture (payment shipping)</payment_type_manual>
 <save_button>Save</save_button>
 <error_message>You need to complete the PayPal identification Information in step 3 otherwise you won’t be able to accept payment.</error_message>
 <congratulation_title>Congratulation !</congratulation_title>
 <congratulation_live_mode>You can now start accepting Payment  with PayPal.</congratulation_live_mode>
 <congratulation_test_mode>You can now start testing PayPal solutions. Don’t forget to comeback to this page and activate the live mode in order to start accepting payements.</congratulation_test_mode>
 <u1>
  <signUpCallButton>Sign Up</signUpCallButton>
  <content>Once your account is created, come back to this page in order to complete step 3.</content>
  <signUpRedirectLink>https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=2</signUpRedirectLink>
 </u1>
 <u2>
  <signUpCallButton>Subscribe</signUpCallButton>
  <content>
   Click on the SAVE button only when PayPal has approved your subscription for this product,<![CDATA[<br />]]>
   otherwise you won't be able to process payment. This process can take up to 3-5 days.
  </content>
  <signUpRedirectLink>https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=4</signUpRedirectLink>
 </u2>
 <u3>
  <signUpCallButton>Sign Up</signUpCallButton>
  <content>Once your account is created, come back to this page in order to complete step 3.</content>
  <signUpRedirectLink>https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=3</signUpRedirectLink>
 </u3>
 <u4>
  <signUpCallButton></signUpCallButton>
  <content></content>
  <signUpRedirectLink></signUpRedirectLink>
 </u4>
 <u5>
  <signUpCallButton>Subscribe</signUpCallButton>
  <content>
   Click on the SAVE button only when PayPal has approved your subscription for this product,<![CDATA[<br />]]>
   otherwise you won’t be able to process payment. This process can take up to 3-5 days.<![CDATA[<br />]]>
   <![CDATA[<br />]]>
   If your application for Website Payments Pro has already been approved by PayPal, please go directly to <![CDATA[<a href="#" id="step3">]]>step 3<![CDATA[</a>]]>.
  </content>
	    <signUpRedirectLink>https://altfarm.mediaplex.com/ad/ck/3484-148727-12439-23?ID=4</signUpRedirectLink>
 </u5>
 <u6>
  <signUpCallButton></signUpCallButton>
  <content></content>
  <signUpRedirectLink></signUpRedirectLink>
 </u6>
</country>

Link to comment
Share on other sites

  • 2 months later...

As far as I have found you can't. In PS versions 1.4x PS makes use of the PS translation system. In PS 1.5x that was changed and now an xml file is used that only allows support of a default language. In my case, I removed the xml file and I use just an image of the PayPal logo that requires no translation.

 

I do not know why PS made this change.

Link to comment
Share on other sites

  • 1 month later...

Confirmed that for multi-lingual countries translations.xml file is no use as it considers that each country has only one language it uses iso-code, sorry for Switzerland... but if anyone has a smart solution ....

Link to comment
Share on other sites

found this comment on svn about subject

 

 

"Ok I understand, but we cannot.

This module comes from a partnership (with PayPal).

So they want their own "commercial" content, that's why the module is not "easily" translatable.

Thank you,

Regards."

 

Paypal has then defined that only SINGLE language countries exists and it is a commercial model ;-) you are very kind to allow this model partnership with paypal, thanx to find a quick solution :-)

  • Like 1
Link to comment
Share on other sites

Hi guys,

 

I have a big problem. I also want to change the PayPal text in the payment checkout. I know I have to make changes in modules/paypal/translations.xml. The problem is (I'm using the newest PayPal version 3.4.5 and PS version 1.3.5.1) that the files in the module are all set to 644 and not writeable!? I also can not chmod them with Filezilla. Anybody knows how to solve this?

Link to comment
Share on other sites

Hello BnB, I see it as a hosting issue. I am not sure your exact specific case but I explain what happened in my case.

 

Probable Prestashop downloaded/extracted the module when you installed it.

The files are under the user that runs php (I suspect it's a mod_php of apache and the user can be nobody, apache ...). Because of this you are not the owner of them and can't change them. Have you tried to edit the files with cpanel filemanager? it should work as a workaround

 

Today, most hosts are running php as a fcgi module and under the user that holds the hosting account so this kind of problems are avoided.

Link to comment
Share on other sites

thx Emily_D for this

Sarah, if you use fr,it and de for languages you should try this fix. The solution is in the second post but you should read the first one to understand the problem.

 

it seems it does not solve as : "Cette solution ne fonctionne que si le code iso du pays et de la langue sont identiques. Pour le cas de l'anglais, code iso 'en', la traduction par défaut de paypal sera sélectionnée (traduction en anglais, cela tombe bien...)."

translated : Only works if country Iso code and lang are the same.

 

In Switzerland we have 4 official languages : iso codes are ch-fr, ch-de, ch-it and ch-ro

Link to comment
Share on other sites

Sarah, if you use Prestashop "language packs", you'll get iso code fr for french,de for german, and it for italian. So that should work for those languages.

 

 

If you have a specific language packs such as ch-fr, ch-de, ch-it and ch-ro, you can use this function :

 

function getCountryByLang($lang_iso_code)
{
 switch($lang_iso_code)
 {
  case "ch-fr": // suisse romand
 return "FR";
 case "ch-de": // suisse allemand
 case "ch-ro": // romanche
 return "DE";
 case "ch-it": // suisse italien
 return "IT";
 default:
 return strtoupper($lang_iso_code);
 }
}

 

 

Since there's no paypal translation for romanche, I use the german one.

 

 

So to recap, you need to have :

 

 

// modules/paypal/paypal.php, l 703)
public function getTranslations()
{
 ...
 // replace
 if (($this->iso_code != 'default') && ($country_iso == $this->iso_code))

 // by
$correct_iso_code = $this->getCountryByLang($this->context->language->iso_code);
 if (($correct_iso_code != 'default') && ($country_iso ==  $correct_iso_code))
 ...
}

// add this function
public function getCountryByLang($lang_iso_code)
{
 switch($lang_iso_code)
 {
 case "ch-fr": // suisse romand
   return "FR";
 case "ch-de": // suisse allemand
 case "ch-ro": // romanche
   return "DE";  
 case "ch-it": // suisse italien
   return "IT";
 default:
   return strtoupper($lang_iso_code);
 }
}

Edited by emily_d (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hi guys,

 

I started a thread concerning the translation of the Paypal Express Checkout page and received a great solution. However I am not able to view my own thread any more?!

 

http://www.prestasho...anguage/unread/

 

Anyways, here's the solution for everyone who ran into the same issue. Thanks so much Xavier, you're amazing!! Your solution works perfectly :)

 

 

 

xavdpub has just posted a reply to a topic that you have subscribed to titled "Paypal Express Checkout in wrong language".

 

----------------------------------------------------------------------

Hi

Forget about translations

On prestashop 1.5.2 and paypal 3.4.4 (not tested for other versions)

 

in module/paypal/expresscheckout/process.php :

add the " localecode" function like this in this order (!) , around line 145

// Set payment detail (reference)

$this->_setPaymentDetails($fields);

$fields['SOLUTIONTYPE'] = 'Sole';

$fields['LOCALECODE']='US';

$fields['LANDINGPAGE'] = 'Login';

 

And in module/paypal/paypal.php

change the country to US

 

DEFAULT_COUNTRY_ISO = 'US';

 

let us know if this flies , it did for me

Best

Xavier

Link to comment
Share on other sites

  • 5 months later...
  • 1 month later...
×
×
  • Create New...