Results 1 to 10 of 17

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    help question PayPal Express Checkout Default Language

    My client is located in Italy and so her account is setup through paypal.com but resides at paypal.it. The Zen cart site language is English and we would like the PayPal default language to also be English. However, I've just been informed by a potential customer in Germany that our PayPal page is in Italian. When I had a friend check the language from the US, PayPal was in English.

    As I am also in Italy, it is difficult to know which language PayPal is defaulting to elsewhere.

    What steps can I follow to be certain that the default PayPal page is in English or in the local language in which the user resides?

    We are running on Zen 1.3.8a

    Thank you

  2. #2
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: PayPal Express Checkout Default Language

    Hmmm... in this post Dr byte is saying:
    The module is designed to automatically operate in the primary language of the country your store is located in. You set this in Admin->Configuration->My Store->Country.
    Since my store is located in Italy I obviously have that set to Italy but that is not the default language I want. However, if I change that to another English-speaking country just for the sale of the English language default it would have other repercussions, correct?

    I thought that PayPal defaulted to the language of the country it was in and if all else failed reverted to English.

    Help...?

  3. #3
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: PayPal Express Checkout Default Language

    If you don't like the way it works, just change it. The code that determines the locale submitted to PayPal is this:
    Code:
      function getLanguageCode() {
        $lang_code = '';
        $storeISO = zen_get_countries(STORE_COUNTRY, true);
        if (in_array(strtoupper($storeISO['countries_iso_code_2']), array('US', 'AU', 'DE', 'FR', 'IT', 'GB', 'ES', 'AT', 'BE', 'CA', 'CH', 'CN', 'NL', 'PL'))) {
          $lang_code = strtoupper($storeISO['countries_iso_code_2']);
        } elseif (in_array(strtoupper($_SESSION['languages_code']), array('EN', 'US', 'AU', 'DE', 'FR', 'IT', 'GB', 'ES', 'AT', 'BE', 'CA', 'CH', 'CN', 'NL', 'PL'))) {
          $lang_code = $_SESSION['languages_code'];
          if (strtoupper($lang_code) == 'EN') $lang_code = 'US';
        }
        return strtoupper($lang_code);
      }
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: PayPal Express Checkout Default Language

    Where is that? I'm not seeing it in includes/modules/payment/paypal.php.

    Also what about this chunk of code? I had seen reference to the fact that it automatically defaults to country browser, although I don't know where to place it:
    PHP Code:
    'lc' => $order->customer['country']['iso_code_2'], 
    Plus, in My Store>Language Selector: Should the default language be based on the Store preferences, or the customer's browser settings? It is now set to Store's default settings.


    Thanks
    Last edited by MeltDown; 4 Sep 2008 at 07:36 AM.

  5. #5
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: PayPal Express Checkout Default Language

    OK, I found that bit of code in: includes/modules/payment/paypaldp.php

    However, even if I stare at it really hard I have no idea how to make it do what I want..

    I've been told by a customer in Germany that the PayPal page is in Italian, which is where the brick-and-mortar store is located. Could anyone give me some pointers on how to correctly modify the code so that the PayPal page defaults to the language of the country the customer resides in or to English?

    Thanks!!

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: PayPal Express Checkout Default Language

    For express checkout, you'll want to be working with the paypalwpp.php file, not the paypaldp.php file.

    To base the locale selection on the customer's language choice, change this:
    Code:
        } elseif (in_array(strtoupper($_SESSION['languages_code']), array('EN', 'US', 'AU', 'DE', 'FR', 'IT', 'GB', 'ES', 'AT', 'BE', 'CA', 'CH', 'CN', 'NL', 'PL'))) {
    to this:
    Code:
        } 
    if (in_array(strtoupper($_SESSION['languages_code']), array('EN', 'US', 'AU', 'DE', 'FR', 'IT', 'GB', 'ES', 'AT', 'BE', 'CA', 'CH', 'CN', 'NL', 'PL'))) {
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Jun 2006
    Location
    My family and I live in Brighton, England
    Posts
    982
    Plugin Contributions
    0

    Default Re: PayPal Express Checkout Default Language

    Thanks for your help. That seems to have worked well.

    I wanted to ask, if I could, what is the recommended setting for admin/configuration/My Store/Language Selector? (Should the default language be based on the Store preferences, or the customer's browser settings?) Right now it is set to the Default: Store's default settings. Does that setting have any effect on PayPal?

    Also, I see that on the PayPal checkout page there is a language dropdown selector (which is great!) but with a limited number of languages (English, French, Spanish & Japanese). Is it possible to add to that list?

    Thanks again.

  8. #8
    Join Date
    Oct 2008
    Posts
    55
    Plugin Contributions
    0

    Default Re: PayPal Express Checkout Default Language

    Quote Originally Posted by DrByte View Post
    For express checkout, you'll want to be working with the paypalwpp.php file, not the paypaldp.php file.

    To base the locale selection on the customer's language choice, change this:
    Code:
        } elseif (in_array(strtoupper($_SESSION['languages_code']), array('EN', 'US', 'AU', 'DE', 'FR', 'IT', 'GB', 'ES', 'AT', 'BE', 'CA', 'CH', 'CN', 'NL', 'PL'))) {
    to this:
    Code:
        } 
    if (in_array(strtoupper($_SESSION['languages_code']), array('EN', 'US', 'AU', 'DE', 'FR', 'IT', 'GB', 'ES', 'AT', 'BE', 'CA', 'CH', 'CN', 'NL', 'PL'))) {

    Im working on version 1.3.9.g, where could I go about finding that as I dont see in the specified file... cann you point me in the right direction?

 

 

Similar Threads

  1. v154 Wrong language on Paypal Express Checkout since upgrade to v1.54.
    By Jin Voles in forum PayPal Express Checkout support
    Replies: 7
    Last Post: 2 Oct 2016, 11:02 AM
  2. v151 Specifing Default Country for Paypal Express
    By TTZZ in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 26 May 2014, 10:48 AM
  3. Cart not showing on paypal express Check after click on express checkout button
    By magic.solve in forum PayPal Express Checkout support
    Replies: 5
    Last Post: 2 Aug 2011, 06:58 PM
  4. paypal website standard IPN acting as express checkout (paypal login only)in checkout
    By sheena88 in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 9 Oct 2010, 02:36 AM
  5. Default PayPal Express Checkout problem (10002) can't complete transaction
    By Darla in forum PayPal Express Checkout support
    Replies: 11
    Last Post: 26 Jul 2010, 11:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg