Override default WordPress core translation

You could use gettext filter: add_filter( ‘gettext’, ‘cyb_filter_gettext’, 10, 3 ); function cyb_filter_gettext( $translated, $original, $domain ) { // Use the text string exactly as it is in the translation file if ( $translated == “Categorie: %s” ) { $translated = “Sectie: %s”; } return $translated; } If you need to filter a translation with … Read more

Change language by clicking a button

By far the best (easiest) way is to use the locale filter (inside get_locale()). First set up a quick function for retrieving a different language to use on the locale filter. /** * A function returns with returns the user’s selectd locale, if stored. */ function wpse35622_get_new_locale($locale=false){ $new_locale = get_user_meta(get_current_user_id(), ‘wpse_locale’, true); if($new_locale) return $new_locale; … Read more