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 чтобы при обновлении эти файлы не изменились.
Tom
(@tom-van-m)
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';
}