Hello everybody. There is a widget for WP + BuddyPress that displays the number of user updates (BOS, friend requests, etc.). But I just can't translate a single line of code:

if($instance['show_count']) printf(__('Есть %d уведомление','bpdnw'),$count); if($instance['show_list']) self::print_list($notifications,$count); 

Instead of $ notifications, "You have (number of messages) new message" is displayed, how to translate this into your native Russian language? After some time it dawned on me that it is possible that this line is taken from the system, in which case can I somehow use all this? In general, I do not explain to you. :) Thank you in advance.

    1 answer 1

    And if so ?

     if($instance['show_count']) printf(__('Есть %d уведомление','bpdnw'),$count); if($instance['show_list']) self::print_list(__($notifications, $count),$count); 

    Well, the translation is correspondingly for the "system" sentence

    • The code is most likely not working, but as a direction for the idea, I think quite ..;) - draev
    • I'm not friends with PHP at all, so much is not clear. What you suggested works, but how can we translate all the same ?! It is clear that% d cannot be used, because it is the sum of all values. Maybe in some files of the engine itself it is written, and you just need to translate there? Because this phrase cannot be taken from the air. - kampolWaMpIr