Tagged: x
-
AuthorPosts
-
February 4, 2017 at 4:31 am #1357779
Hi there,
Please add following code in child theme’s functions.php file :
add_filter('gettext', 'translate_text' ); function translate_text($translated) { $translated = str_ireplace('Share on Facebook', 'Deel via Facebook', $translated); $translated = str_ireplace('Share on Twitter', 'Deel via Twitter', $translated); $translated = str_ireplace('Share on Google+', 'Deel via Google+', $translated); $translated = str_ireplace('Share on LinkedIn', 'Deel via LinkedIn', $translated); $translated = str_ireplace('Share on Pinterest', 'Deel via Pinterest', $translated); $translated = str_ireplace('Share on Reddit', 'Deel via Reddit', $translated); $translated = str_ireplace('Share via Email', 'Deel via Email', $translated); return $translated; }
Hope it helps.
February 4, 2017 at 12:04 pm #1357977Dear Christopher,
thanks! That is a smart and easy way to solve the translation issue. I translated all I need at the moment. So thank you very much for that!
On the other hand I would like to know why the “wordpress” idea with the .po files does not work, to get a deeper understanding!So if anybody could help / explain that, I would realy appreciate it!
kind regards, Norbert
February 4, 2017 at 7:44 pm #1358266Hi there,
Maybe it’s due to text domain or cache. This code works since it will ignore other unknown restrictions.
Cheers!
-
AuthorPosts