• Resolved danina84

    (@danina84)


    Hi,
    after the latest update the string “shipping” in the cart and checkout table are in English, even though my store is German and I have the German po-file. I have checked with Poedit and cannot find the string for this. Where is this? It was working fine before the update.

Viewing 11 replies - 16 through 26 (of 26 total)
  • Tom

    (@tom-van-m)


    This costed me quite some time to figure this out, but I’m glad it works now 🙂

    Nevermind, still got the problem…

    • This reply was modified 6 years ago by Tom.

    Была аналогичная проблема. Потратил кучу времени чтобы найти решение. Наверное глюк из-за того, что поменялся текст фразы. Было “I’ve read and accept the terms & conditions”, стало “I have read and agree to the website terms and conditions”.

    Я решил проблему так:
    1) В файле \wp-content\languages\plugins\woocommerce-ru_RU.po через Notepad++ добавляем поревод из старой версии файла \wp-content\languages\plugins\woocommerce-ru_RU.
    2) Через Poedit компелируем файл .mo
    3) Закидываем .po и .mo в папку \wp-content\languages\plugins\ и wp-content\plugins\woocommerce\i18n\languages чтобы при обновлении эти файлы не изменились.

    This is caused by a language file (old file) in /languages/plugins
    Merge this file with the new file and upload it in the same directory and it is ok.

    Where do you get that many language files?

    “Shipping” is not translated anyway.

    Well, the string “Shipping [shipping package]” must be translated, that fixed the issue.

    add_filter( 'woocommerce_shipping_package_name', 'custom_shipping_package_name' );
    function custom_shipping_package_name() {
      return 'My translation for shipping goes here';
    }

    Thanks, I know it works, just don’t like the idea of using filters for translations.

    The alternatives are:
    – to fork the .po and .mo files, edit your copies and save them in the custom location so they won’t be overwritten by updates. You’ll have the burden of keeping your custom copies updated yourself instead of being able to leave it to the WC team to do.
    – the Say What? plugin should be able to do it, but but will be using a filter internally.

    To translate “Shipping” in the final checkout step, use Loco Translate to edit “Woocommerce” language, find “Shipping [shipping package]” and change it to the text you want.

    I’ve successfully changed this on my site.

    Stonez

    Unable to translate “Shipping” string in Checkout review table
    and
    “items” string in Cart menu

    Yes it’s stil not solved use this in funtions.php of your template:

    add_filter( 'woocommerce_shipping_package_name', 'custom_shipping_package_name' );
    function custom_shipping_package_name( $name ) {
      return 'YOUR TRANSLATION';
    }
    
Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘String in tables still in English after update’ is closed to new replies.