• Resolved divemate

    (@divemate)


    Hi,
    first of all thanks for your plugin!

    I am setting up a shop on our website (www.divemate.de/shop) with two languages (english and german).
    Everything works well, but a few strings do not get translated to german.
    For example in the cart page, “product”, “price”, “quantity”, “Update cart”, “Apply Coupon” are in english, other text (“coupon”, “shipping”) gets translated.

    What I have done so far:
    I have localized the pages for ‘shop’, ‘cart’, ‘checkout’ and the product pages.

    polylang settings:
    -“Detect browser language” is turned off
    -URL modifications is set to “The language is set from the directory name in pretty permalinks”

    Don’t know if this is relevant, but the sequence of installed plugins was as follows:
    1. polylang
    2. woocommerce
    3. hyyan plugin

    I have also checked that the .po and .mo files are in place at
    /wp-content/languages/woocommerce/

    Do you have any idea why some strings get translated and some not ?
    Thanks!
    Martin

    https://www.ads-software.com/plugins/woo-poly-integration/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Hyyan Abo Fakher

    (@hyyan)

    @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.

    decarvalhoaa

    (@decarvalhoaa)

    Same problem here. Anyone has found a solution?

    viriato_sueco

    (@viriato_sueco)

    Well, I have this exact issue with the string QTY :/ No solutions?

    decarvalhoaa

    (@decarvalhoaa)

    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://www.ads-software.com/support/topic/translating-shipping-options-and-payment-options

    decarvalhoaa

    (@decarvalhoaa)

    @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 );
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘some strings not translated’ is closed to new replies.