Answer the question
In order to leave comments, you need to log in
How to change the inscription No products in the cart into Russian?
Greetings. There was a problem with the right dropdown cart menu. When there is no product in the cart, the inscription No products in the cart. Everything else is in Russian. I tried to change through Loco Translate, but this line already has a Russian translation. Why it doesn't change I have no idea.
Answer the question
In order to leave comments, you need to log in
Hello!
The translation of this string may not only be in the translation file of the Woocommerce plugin. Quite often, the theme developer, adapting the templates of the soundtrack to his design, adds lines to the theme.
Accordingly, look for the translation of this string in your theme's translation file.
Also, if you use any plugin related to wokomerz or cart, then maybe this line will be in the translation file of this plugin.
Also faced this problem. I looked at all the widgets (there are not so many of them) through Loco, but I did not find it. Wherever there is this phrase, there is also a translation into Russian. Who faced, tell me.
function my_text_strings_public( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'No products in the cart.' :
$translated_text = __( 'There are no items in the cart yet.', 'woocommerce' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'my_text_strings_public', 20, 3 );
/*
* Translation of any text on the WordPress site, WooCommerce code
* Add the code to function.php of your theme
* Created by motiv.by
*/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question