• Resolved charmmedia

    (@charmmedia)


    On the single event listing, for an all-day event, the phrase “All of the day” appears under Time. I’d like to change this to “All day”. I don’t want to use a translation plugin to do this as this is already a multi-language site. Is there a way to change this another way?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor webnus

    (@webnus)

    Hello,

    The multi-language plugin can help you to translate all strings.

    If you use the monolingual please read and follow this article: https://webnus.net/dox/modern-events-calendar/translate-mec/

    Regards

    Thread Starter charmmedia

    (@charmmedia)

    Thanks. As I mentioned in my original message, I’d really rather not install yet another translation plugin as I already have one installed, and will be translating everything into a different language, which complicates things further. Is there no other way to change this text? “All of the day” is not the correct way to say this in English.

    I also agree that an all-day event should be listed as “All day” and not “All of the day”, which is an unusual way to put it in English (at least in America).

    @charmmedia, here are two other ways to change the “All of the day” text:

    Add this to your theme’s functions.php file:

    add_filter('gettext', 'translate_text');
    function translate_text($translated) { 
    $translated = str_ireplace('All of the day', 'All day', $translated);  
    return $translated; 
    }

    Or, replace the 'All of the day' text in line 86 and 298 (at least in version 4.6.0) of plugins > modern-events-calendar-lite > app > skins > single > default.php, as shown below with 'All day':

    <dd><abbr class="mec-events-abbr"><?php _e('All of the day', 'modern-events-calendar-lite'); ?></abbr></dd>

    Using this last method, note that any modifications made to the plugin files will be lost every time you update the plugin, so you will have to manually make the modification to the file again, after you update the plugin.

    Hope this is helpful!

    Thread Starter charmmedia

    (@charmmedia)

    Thank you @hastibe! This is exactly what I was looking for. Much appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change “All of the day” text’ is closed to new replies.