• Resolved danielforr

    (@danielforr)


    Greetings,

    I would like to ask about specific problem. I use this plugin on various pages, every one in different language, but I have problem with one language – Slovak.

    I noticed that part of attribute src in iframe is locale=sk, which is correct.
    But html of the button is <button class="ApplePayButton ApplePayButton--buy ApplePayButton--dark" lang="en" aria-label="Buy with Apple Pay" role="button" type="submit"></button>
    As you can see, value of attribute lang stays en.
    When I try to change it in developer tools to sk, the language normally changes to Slovak language, so it looks like Slovak translation exists.

    I’ve even tried to change it with hook add_filter( 'wc_stripe_payment_request_button_locale', function() { return 'sk'; });, but that only changes src attribute in iframe, which is correct even without this code.

    Hope there is some solution.

    Thank you and have a good day.
    Daniel

    • This topic was modified 4 years, 8 months ago by danielforr.
Viewing 1 replies (of 1 total)
  • When I try to change it in developer tools to sk, the language normally changes to Slovak language, so it looks like Slovak translation exists.

    I see what you mean, but I’m guessing that is specific to the Apple Pay button. I’m not sure about the mechanics of how Stripe generates that button and passes the language parameters, but the correct language is served if the locale is set to any of the languages that are listed as supported by Stripe’s documentation here: https://stripe.com/docs/js/elements_object/create#stripe_elements-options-locale.

    I also compared results with the Google Pay button using the various languages that are supported. The language is changed if the language is supported but if I use a language not listed as supported, it defaults to English.

    The iframe is generated at Stripe – you might ask them if there’s a way to get the button to display in the language of your choosing.

Viewing 1 replies (of 1 total)
  • The topic ‘Apple Pay Button Locale SK’ is closed to new replies.