Closed (outdated)
Project:
Commerce PayPal
Version:
7.x-1.x-dev
Component:
PayPal WPS
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Dec 2011 at 14:07 UTC
Updated:
18 Aug 2025 at 21:18 UTC
Jump to comment: Most recent
Comments
Comment #1
ntigh52 commentedHi,
I added the il on:
commerce_paypal_wps.module
tha , 'IL' in the end of array, and its work!
rszrama, Thanks again.
Comment #2
teebow commentedI run a multi language + multi currency website.
How can I get the module to send the visitors to the right PayPal WPS country site depending on the site language?
As of now, I believe we can only choose 1 PayPal screen language within the admin settings.
Basically, the URL differs depending on the country code specified within the URL:
Thanks
Comment #3
Toxid commented@teebow,
You'd have to change the commerce_paypal_wps_server_url function into this:
Also, the settings for language appears to do nothing at this point. You'd have to do something like this to make the settings take effect:
Comment #4
phirex commented@Toxid
Hi, i'm also using a multi currency and multi lingual site.
I tried your code, but it doesnt work on my side. paypal login page is still selected from the lang menu..
Comment #5
Toxid commentedYou're right, it seems that paypal only offers a limited amount of languages for login pages. If you try 'de' you get the german page. So it seems that the problem is on paypals end.
Comment #6
rszrama commentedYes, in fact I've just updated the list of supported languages and locales within the WPS module in this issue: [#]
You're not supposed to pass the parameter in via the URL but as part of the form (specifically the lc parameter). This only supports a subset of languages and locales, and those are now all represented as options on the settings form. As to the question above about selecting a different PayPal login page based on the current user's language, I think the best thing to do right now will be to alter the PayPal WPS parameters yourself using hook_commerce_paypal_wps_order_form_data_alter() (described in commerce_paypal_wps.api.php) to use whatever lc value you want based on your site's configuration.
I'm going to repurpose this as a feature request, though, to change the login page language based on the current user's language, but it's going to require more than a simple mapping of Drupal language codes since PayPal doesn't support every language and uses some customer 5 character codes for certain locales. We'll have to detect the current language, see if it maps to a known PayPal language, and change the lc parameter accordingly; otherwise we'll just leave it at the configured default login page language.
Comment #6.0
rszrama commented1
Comment #7
guy_schneerson commentedThanks @rszrama hook works perfectly for me.
For whoever is interested a simple example of changing the language to English
Comment #8
tomtech commentedAutomatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.