Using customised language file for Event Organiser plugin?

Put your language files to a place where they are not overwritten. Then change the path to your custom language files on 'load_textdomain_mofile'.

Pseudo-code, you have to change the path and the text domain:

add_filter( 'load_textdomain_mofile', 'wpse_63643_custom_eo_lang', 10, 2 );

function wpse_63643_custom_eo_lang( $mofile, $domain )
{
    if ( 'eventorganiser' === $domain )
    {
        remove_filter( current_filter(), __FUNCTION__ );
        return '/full/path/to/your/language/files.mo';
    }

    return $mofile;
}

Leave a Comment