@divemate most of time this is happen when you add new languages from polylang settings page before this plugin is activated , so the woocommerce translation files are not downloaded and set correctly , I would suggest to re-add the German language from ploylang settings page , after you activate this plugin , so the plugin could have a change to make things correctly, and you will not lose any translated during this operation .
I am marking the thread as resolved , cause it is not a quiet a plugin issue, please reopen the thread if the problem persists
Hi Hyyan,
I have a similar problem with some strings not translated in just “Shipping” and “Payment” and everything else seems to be working ok. There’s multiple shipping and payment options enabled and it appears only the first option is translated and not the rest.
Ex. Shipping: Free Delivery (translated), Local Delivery (not translated) and etc. Payment: Bank Transfer (translated), Cash on Delivery (not).
I installed and activated the plugins in the following sequence; woocommerce, polylang, hyyan woocommerce and then added the languages.
Thanks.
Same problem here. Please assist.
Same problem here. Anyone has found a solution?
Well, I have this exact issue with the string QTY :/ No solutions?
I think the Author is working on a fix in the next release that can potential address some of these issues. Check it out here:
https://ww.wp.xz.cn/support/topic/translating-shipping-options-and-payment-options
@jtekvn, @samosamo, @ viriate_sueco
adding the below code to my child theme functions.php file solved my issues. Not sure if will work for you.
/**
* Fix Shipping method not translated by Woo_Poly
*/
// In Cart and Checkout pages
function tlc_translate_shipping_label( $label ) {
return __( $label , 'woocommerce' );
}
add_filter( 'woocommerce_shipping_rate_label', 'tlc_translate_shipping_label', 10, 1 );
// In My Accoutn page, Order Emails and Paypal request
function tlc_translate_order_shipping_method( $implode, $instance ) {
// Convert the imploded array again to an array that is easy to manipulate
$shipping_methods = explode( ', ', $implode );
// Array with translated shipping methods
$translated = array();
foreach ( $shipping_methods as $shipping ) {
// Polylang will take care of the translation
$translated[] = __( $shipping, 'woocommerce' );
}
// Implode array to string again
$translated_implode = implode( ', ', $translated );
return $translated_implode;
};
add_filter( 'woocommerce_order_shipping_method', 'tlc_translate_order_shipping_method', 10, 2 );
/**
* Fix Payment gateway and respective description not translated by Woo_Poly
*/
function tlc_translate_payment_gateway_title( $title, $id ) {
return __( $title , 'woocommerce' );
}
add_filter( 'woocommerce_gateway_title', 'tlc_translate_payment_gateway_title', 10, 2 );
function tlc_translate_payment_gateway_description( $description, $id ) {
return __( $description , 'woocommerce' );
}
add_filter( 'woocommerce_gateway_description', 'tlc_translate_payment_gateway_description', 10, 2 );