P
P
Pavel Ryabinin2020-04-25 22:33:45
WordPress
Pavel Ryabinin, 2020-04-25 22:33:45

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.

5ea490949fbbb958097500.jpeg

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
Orkhan Hasanli, 2020-04-25
@azerphoenix

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.

S
SDL777, 2021-02-11
@SDL777

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.

K
kudesnikNet, 2022-03-02
@kudesnikNet

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 question

Ask a Question

731 491 924 answers to any question