• Resolved trailerproffsen

    (@trailerproffsen)


    I can not find where to translate the “READ MORE” button on out of stock Products to Swedish.

    I use latest wp, woocommerce, Composite Products, loco translate, North theme and have searched all language files without success.

    Anyone have a solution?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hi @trailerproffsen,

    The read more button text for out of stock products is this text string below in Loco Translate and is within the WooCommerece core plugin language files.

    I added your username as the text to be translated in Loco Translate and it’s that text which displays on the product now instead of “Read more”.

    The functionality of WooCommerce itself is correct when cross testing for you and translating this text using Loco Translate.

    If it’s still not translating for you try changing theme temporarily to a theme like Storefront which is what I used when testing to see if the behaviour persists on your site.

    If it does persist it maybe a plugin you have enabled and I would try deactivating all plugins aside from WooCommerce to test if that’s the case.

    Thread Starter trailerproffsen

    (@trailerproffsen)

    Thanks Stuart, the read more text string is/was translated as of above (but to “L?s Mer” on Swedish) but the button still shows READ MORE ??

    This is really strange as the “Select options” is translated ok and it is possible to change to anything that I want..

    Is it safe to just inactivate plugins and change theme without loosing settings and data of the plugins/themes?

    Anyone else have a clue or have had the same “error” ?

    Thread Starter trailerproffsen

    (@trailerproffsen)

    Google is my friend ??

    found the answer, I pasted this in functions.php and now it is working.

    /*
    * Translate custom strings
    */

    add_filter(‘gettext’, ‘translate_text’);
    add_filter(‘ngettext’, ‘translate_text’);

    function translate_text($translated) {
    $translated = str_ireplace(‘Read More’, ‘Kontakta oss’, $translated);
    return $translated;
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Translate READ MORE button on out of stock products’ is closed to new replies.