CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Default English on paypal.de payment page for Paypal Standard
Pages: [1]

Author Topic: Default English on paypal.de payment page for Paypal Standard  (Read 3978 times)

agrevet

  • Guest
Default English on paypal.de payment page for Paypal Standard
November 24, 2008, 03:17:45 am

My English-speaking global non-profit organization has a Paypal Standard account in Germany (paypal.de).  There is no way in the paypal account preferences to set the payment page to display English as a default.  You set "Western European languages" which displays a dropdown box where you can select English, but the payment page always comes in in German making the page hard to navigate.  Paypal support has given me the code to add to the "Continue" button that sends you from your website registration page to paypal, but that is an html fix and I am using Civicrm -- I do not know where in the files, or how, to add the variable or make this change so that the German payment page will always display in English.  Can anyone help me?  Below I will paste the html instructions sent to me by Paypal, which I don't think I can use with civicrm:

So if you want to set the language in English you just have to add this line to your button code:

<input type="hidden" name="lc" value="EN">

Here for the country:

<input type="hidden" name="country" value="UK”">

Another solution, if you have a multi language website and that leads to one single payment page, you could load a session variable in your button like this:

<input type="hidden" name="lc" value="<?=$_SESSION["CURRENT LANGUAGE"]?>">

This last example works if:
• You are using PHP
• You save the session variable “CURRENT LANGUAGE” in the same format that PayPal uses (us, gb, etc)
• You omit the “country” variable that has the priority.


Many thanks if anyone can help!

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Default English on paypal.de payment page for Paypal Standard
November 24, 2008, 08:08:02 am

1. edit the file CRM/Core/Payment/PayPalImpl.php

2. goto line 326 and add the foll:

Code: [Select]
   lc => 'EN'

hopefully that should work :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Default English on paypal.de payment page for Paypal Standard

This forum was archived on 2017-11-26.