Support

Home Forums Event Espresso Premium Where can I change the wording on the Upcoming and Expired in Status Banner

Where can I change the wording on the Upcoming and Expired in Status Banner

Posted: June 9, 2015 at 5:21 pm


scaldwell

June 9, 2015 at 5:21 pm

I can’t find where I can change the words…?


Dean

June 10, 2015 at 12:53 am

Hi,

Wording is (generally) changed via the language files – you basically translate from English to English.

There’s a couple of ways to do this, both outlined here: https://eventespresso.com/wiki/how-to-change-wording-with-poedit/

Not all the strings (wording) are obvious, so if the wording doesn’t change let us know, as some strings have hidden symbols to allow for dynamic changing of the strings.

If you have any further queries regarding this please just ask.


scaldwell

June 10, 2015 at 11:45 am

Well, I tried the Quick Localisation plugin, it didn’t work, and I tried the functions.php edit and that didn’t work either.

What do you think is keeping these from working?

Thank you!


Josh

  • Support Staff

June 10, 2015 at 3:44 pm

Hi there,

It may help to see the code you’re trying in functions.php to know for sure, but my guess is since they’re case sensitive, it might be you have ‘Upcoming’ where it should be ‘upcoming’.


scaldwell

June 11, 2015 at 9:07 am

Here’s my code:
function mycustom_filter_gettext( $translated, $original, $domain ) {

// This is an array of original strings
// and what they should be replaced with
$strings = array(
‘Upcoming’ => ‘spaces still available for this class’,
‘Expired’ => ‘this class is full or not begin offered this term<br />sign up for our waiting list‘,
‘No events available…’ => ‘No upcoming classes at this time…’,
// 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 );

Thank you for any guidance you can offer..


Josh

  • Support Staff

June 11, 2015 at 9:36 am

Can you try ‘upcoming’ instead of ‘Upcoming’?


scaldwell

June 11, 2015 at 12:55 pm

Oh I am such a dork! That worked great!!! Thanks Josh!!


Josh

  • Support Staff

June 11, 2015 at 2:39 pm

Nicely done! Glad it worked out for you.

The support post ‘Where can I change the wording on the Upcoming and Expired in Status Banner’ 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.

Event Espresso