Created
July 18, 2015 14:20
-
-
Save scysys/c98f3efb86de92b75489 to your computer and use it in GitHub Desktop.
Wordpress String Translate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function stringtranslate_filter_gettext( $translated, $original, $domain ) { | |
$strings = array( | |
'Post Comment' => 'Hinterlassen Sie eine Antwort', | |
); | |
if ( isset( $strings[$original] ) ) { | |
$translations = &get_translations_for_domain( $domain ); | |
$translated = $translations->translate( $strings[$original] ); | |
} | |
return $translated; | |
} | |
add_filter( 'gettext', 'stringtranslate_filter_gettext', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment