How to change WordPress default strings?

Additionally to kaiser’s answer, you can load customized .mo files that overrides the original file using load_textdomain_mofile filter. For example:

add_filter( 'load_textdomain_mofile', 'cyb_filter_load_textdomain_mofile', 10, 2 );
function cyb_filter_load_textdomain_mofile( $mofile, $domain ) {
    if ( $domain == 'some-textdomain-to-override' ) {
        $mofile = WP_LANG_DIR . '/overrides/' . basename( $mofile );
    }
    return $mofile;
}

It may be faster but you will be required to check for changes on every update in order to keep your .mo file syncrhonized with the original.

Leave a Comment