Support » Plugin: Related Posts Thumbnails Plugin for WordPress » The problem with the header output thumbs in different languages

  • Resolved funt565

    (@funt565)


    I have a multi site in Russian and English.
    How to make the plugin title displayed in the language of the page that the user requests?

    That is, in the heading “Похожие посты” for the Russian language, and in the English version should be “Similar posts”?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Asad Shahbaz

    (@artisticasad)

    Hi,

    To get both English and Russian language translated title strings, you can simply add the following code snippet at the bottom of your themes functtion.php file

    add_filter( 'rpt_top_text', function( $top_text ) {
    	$locale = get_locale();
    	$disply_top_text = $top_text;
    
    	if ( 'ru_RU' == $locale ) {
    		$disply_top_text = '<h3> Похожие посты” </h3>';
    	}
    
    	return $disply_top_text;
    } );

    Now, In the Settings page add your default English title as here in this screenshot: https://monosnap.com/file/dI9KPohmF2kjfHqA1AL8jXXQxlDpAB

    If you face any issue please let me know.

    Cheers!

    funt565

    (@funt565)

    Wow! It `s Magic! Thank!

    Plugin Support Asad Shahbaz

    (@artisticasad)

    I am glad it worked well. If you like using our plugin don’t forget to give a five star review. 😉

    Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.