This can be changed with a simple custom plugin to override translatable strings
As an example, you can try this:
<?php
/*
Plugin Name: No Cheating
Plugin URI: http://cubecolour.co.uk
Description: Change the 'Cheatin' huh?' message
Author: cubecolour
Version: 0.0.1
Author URI: http://cubecolour.co.uk
Text Domain: no-cheating
Licence: GPL
*/
if ( ! defined( 'ABSPATH' ) ) exit;
/**
* No Cheating
*
*/
function ccnc_filter_gettext( $translated, $original, $domain ) {
// Array of original & replacement strings
$strings = array(
"Cheatin’ uh?" => "Computer says no",
);
// Replace the translation with the new string
if ( ! empty( $strings[$original] ) ) {
$translations = get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'ccnc_filter_gettext', 10, 3 );
Change the example “Computer says no” text to whatever you want to be returned in place of the “Cheatin’ uh?” message.
Note that Cheatin’ uh? is used as that is the orginal string in WordPress being translated to “Cheating are we?” in your localised version.
Also ensure that the apostrophe in the Cheatin’ uh? entry in the $strings array is replaced with the HTML character code ’ as pasting the character code into the forum code block above turned it into an apostrophe.
Other strings can also be replaced by adding them to the $strings array.
-
This reply was modified 8 years, 10 months ago by
cubecolour.
-
This reply was modified 8 years, 10 months ago by
cubecolour. Reason: fix html code for apostrophe being shown as apostrophe