The language files from Event Espresso 3 can be used to translate Event Espresso 4, but I don’t recommend going the Poedit route because I think Poedit is overkill and clunky to use to change a few text strings, so I can offer the suggestion to use a custom function instead.
Here’s something you can add to your theme’s functions.php file or in a custom snippet plugin. Your custom text can be entered between the %s on second part of the the fifth line:
function mycustom_filter_gettext( $translated, $original, $domain ) {
// This is an array of original strings
// and what they should be replaced with
$strings = array(
'%sClick here for Invoice%s' => '%sChanged Invoice link text%s',
// Add some more strings here
);
// See if the current string is in the $strings array
// If so, replace its translation
if ( isset( $strings[$original] ) ) {
// This accomplishes the same thing as __()
// but without running it through the filter again
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'mycustom_filter_gettext', 10, 3 );
The support post ‘EE 4 Change wording generated by the [INVOICE_LINK] short code’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.