Replace a text string in PHP/WordPress
function translate_this( $text_to_translate ) {
$search = array('One','Two');
$replace = array('En','To');
return str_replace( $search, $replace, $text_to_translate );
}
add_filter('the_content', 'translate_this');