Skip to main content

PayPal Checkout SDK v6 – Incorrect button language on Polish checkout page

3 weeks 3 days ago #100000628 by Bone
-- HikaShop version -- : 6.8.1
-- Joomla version -- : 6.2.0
-- PHP version -- : 8.3.36-nmm1
-- Browser(s) name and version -- : Opera

Subject: PayPal Checkout SDK v6 – Incorrect button language on Polish checkout page
Hello,
I've found a localization issue with the PayPal Checkout payment plugin in HikaShop Essential 6.8.1.
My Joomla website is configured in Polish (
Code:
pl-PL
), and the entire checkout page is correctly displayed in Polish. However, the PayPal payment button displays "Pagar com PayPal" (Portuguese) instead of Polish text.
After inspecting the generated HTML and JavaScript, I noticed that the PayPal SDK v6 is initialized without the
Code:
locale
parameter:
Code:
var options = {     "coreUrl": "https://www.paypal.com/web-sdk/v6/core",     "clientId": "...",     "components": ["paypal-payments"],     "pageType": "checkout",     "partnerAttributionId": "HIKARISOFTWARE_Cart_PPCP" };
According to the official PayPal SDK v6 documentation, the locale can be explicitly specified during initialization:
Code:
"locale": "pl-PL"
Expected behavior:
The PayPal Checkout plugin should pass the current Joomla frontend language to the PayPal SDK, so that the payment buttons match the language of the checkout page.
For multilingual websites, the locale should be determined dynamically rather than hardcoded.
Actual behavior:
The plugin does not pass the locale parameter, leaving PayPal to detect the language automatically based on browser settings. This can result in payment buttons being displayed in a different language from the checkout page.
Could you please consider adding automatic Joomla language detection and passing the corresponding locale to PayPal SDK v6?
Thank you!

Please Log in or Create an account to join the conversation.

3 weeks 3 days ago #100000630 by nicolas
Hello,

The PayPal Checkout plugin can already do this: in the backend, open HikaShop > System > Payment methods, edit your PayPal Checkout payment method, and in the "Standard options" section set "Language" ("Język" in the Polish interface) to "Use website language" ("Użyj języka strony"), then save.

With the default value, "Automatic", no locale is given to the PayPal SDK and PayPal chooses the language itself from the visitor's browser and location, which is why you got Portuguese. With "Use website language", the plugin passes the current Joomla language of the page to the SDK (pl-PL on your Polish pages), and on a multilingual site each language version of the checkout gets its own locale automatically.

After saving, reload the checkout page (clear any page cache if you use one) and the button should show in Polish.

Please Log in or Create an account to join the conversation.

3 weeks 2 days ago #100000635 by Bone
The problem is all my settings are ok.
Everything works well in Chrome. The problem is just in Opera (139.0.6053.38).

Please Log in or Create an account to join the conversation.

3 weeks 2 days ago #100000636 by nicolas
Hi,

PayPal uses whatever the browser's language.

The options you posted in your first message have no "locale" line. That means the plugin was not passing the language yet when you looked. With the "Language" setting on "Use website language", the plugin adds "locale": "pl-PL" to these options on your Polish pages.

To check, open your checkout page in Opera, go to the step with the PayPal button, view the page source (Ctrl+U) and search for "locale":

- If you don't find it, the setting is not in effect on the payment method actually used. In HikaShop > System > Payment methods, check that every PayPal Checkout method you have published has "Language" set to "Use website language", and save it. Then clear Joomla's cache (System > Clear Cache) and any page cache or cache plugin you use, and reload the checkout page.

- If you do find "locale": "pl-PL" and the button is still in Portuguese in Opera, please send us a screenshot of the button and the options part of the page source as Opera shows it, so that we can look further.

Opera's preferred languages are listed in its settings, under Languages, where Portuguese is probably at the top. You don't need to change them once the plugin passes the locale, since the website's language then takes precedence.

Please Log in or Create an account to join the conversation.

Time to create page: 0.049 seconds
Powered by Kunena Forum