I tried adding the following to functions.php which worked BUT it made most the website text on the English language side disappear. I’m sure it’s a simple fix, but my php knowledge is limited. Thanks for any help you can give:
add_filter('gettext', 'webnus_framework');
add_filter('ngettext', 'webnus_framework');
function webnus_framework($translated) {
if ( ICL_LANGUAGE_CODE=="fr" ) {
$translated = str_ireplace('Time', 'Temps', $translated);
$translated = str_ireplace('Cost', 'Coût', $translated);
$translated = str_ireplace('Location', 'Emplacement', $translated);
$translated = str_ireplace('Share this Event', 'Partagez cet événement', $translated);
return $translated;
}
}