Answer the question
In order to leave comments, you need to log in
woocommerce. How to change a phrase?
How to replace one Russian word with another? I want to change "Subtotal" to "Sum", but I don't understand how. Woocommerce has a woocommerce.pot file, you can't translate all phrases because of one.
I tried Saphali Woocommerce Russian, but I didn't understand how to change this phrase either.
Answer the question
In order to leave comments, you need to log in
There is a plugin for editing translation files https://ru.wordpress.org/plugins/loco-translate/
in functions.php add the following:
add_filter('gettext', 'translate_text');
add_filter('ngettext', 'translate_text');
function translate_text($translated) {
$translated = str_ireplace('Подытог', 'Сумма', $translated);
return $translated;
}
add_filter('gettext', 'translate_text');
add_filter('ngettext', 'translate_text');
function translate_text($translated) {
$translated = str_ireplace('Subtotal', 'Sum', $translated);
return $translated;
}
Nice to the author, but if you still need to change other fields, can you tell me the scheme so that you don’t write for each line?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question