The ‘All Day’ text is a setting, so you would need to change it to your preferred text.
The problem is that we want “All Day” to appear on the English page and “Toute la journée” on the French page. I have been trying to find a way to do this.
As background, we use the Polylang plugin. I create two My Calendar instances for each event, one in English (category “English”) and one in French (category “Français”). The calendars on the English and French pages are then filtered on the appropriate category to display the correct language. All other text on the French page (grid headings, etc.) is correctly shown in French with the exception of the text string “All Day”.
There is a Languages tab on the Dashboard (which I expect is created by Polylang) with a “Strings translations” function. However, the text string “All Day” does not appear there.
I’m not at all knowledgeable on this, but I have wondered whether custom CSS code or a custom script on the French page to translate the text string might be a possible approach. However, I don’t want to pursue that if there is some way within My Calendar have text strings be language dependent or have text strings appear on the “Strings translation” tab.
No problem. I’d recommend using the filter ‘mc_notime_label’ to add custom terms to make it work for you.
I don’t know exactly what Polylang does to indicate which language you’re currently using, but it would look something like this:
function my_notime_label( $string, $event ) {
$language = get_current_language_from_polylang_somehow();
if ( 'fr' == $language ) {
return 'French text';
}
return 'English text';
}
add_filter( 'mc_notime_label', 'my_notime_label', 10, 2 );
Joe,
Thanks for the very speedy reply to my inquiry. We’ll try your suggestion.
In my ongoing efforts, I stumbled upon a setting that I didn’t know existed. The “Time label” can be specified on a per-event basis. This control only appears once the “All day event” box on the “Edit event” screen has been checked (which largely explains why I was not aware of it). We have very few all day events and it has been a while since I actually created one. Perhaps this is a relatively new feature or I may have seen it and just not realized its significance at the time. But, in any event, it is exactly what I need.