Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"I have read and agree to the website %s" always in English for multi language sites #22127

Closed
BaltasarParreira opened this issue Dec 4, 2018 · 7 comments
Assignees

Comments

@BaltasarParreira
Copy link

BaltasarParreira commented Dec 4, 2018

I think this a bug since I tried with so many different themes and also the official Storefront,

Having a multi language site the phrase "I have read and agree to the website %s" near the checkbox at the end of the checkout page is always in English.

This can be resolved putting this in the child theme functions.php file:

if (!function_exists('My_terms_and_conditions_checkbox_text')) {
    function My_terms_and_conditions_checkbox_text( ) {
        return sprintf( __( 'I have read and agree to the website %s', 'woocommerce' ), '[terms]' ) ;
    }
}
add_filter('woocommerce_get_terms_and_conditions_checkbox_text', 'My_terms_and_conditions_checkbox_text', 10, 3);
@rodrigoprimo rodrigoprimo self-assigned this Dec 5, 2018
@rodrigoprimo
Copy link
Contributor

I was not able to reproduce this on a clean WooCommerce install using Storefront. I tested setting the site language to Brazilian Portuguese, and the string you mentioned is properly translated in the checkout page.

Closing for now as it doesn't look like this is a WooCommerce core bug. Maybe the problem is caused by the plugin you are using to set up a multi-language site? If you still believe this is a WooCommerce core bug, please open another issue following the bug report template (https://github.com/woocommerce/woocommerce/issues/new?template=Bug_report.md).

@BaltasarParreira
Copy link
Author

I see, but just to let you know I'm using the following free plugins:

  • Polylang
  • Hyyan WooCommerce Polylang Integration

Apart this ones what is the alternative you recommend so I can have a multilingual shop and stop having this kind of missing translations problems?

@rodrigoprimo
Copy link
Contributor

I also heard about WPML but I don't have experience with multi language stores so I can't vouch for it.

@emrec76
Copy link

emrec76 commented Mar 4, 2021

Thanks @BaltasarParreira . It helped me 3 years later. For those who don't know, this is a bug caused by the theme and this code works perfectly.

@pjrfigueiredo
Copy link

It worked for me!
thanks @BaltasarParreira

@Houzvicka
Copy link

It works for me too!
Thanks to @BaltasarParreira

@chonline507
Copy link

I think this a bug since I tried with so many different themes and also the official Storefront,

Having a multi language site the phrase "I have read and agree to the website %s" near the checkbox at the end of the checkout page is always in English.

This can be resolved putting this in the child theme functions.php file:

if (!function_exists('My_terms_and_conditions_checkbox_text')) {
    function My_terms_and_conditions_checkbox_text( ) {
        return sprintf( __( 'I have read and agree to the website %s', 'woocommerce' ), '[terms]' ) ;
    }
}
add_filter('woocommerce_get_terms_and_conditions_checkbox_text', 'My_terms_and_conditions_checkbox_text', 10, 3);

Excelente, este me funciono! gracias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants