Support

Home Forums Event Espresso Premium Change Available Tickets wording

Change Available Tickets wording

Posted: July 28, 2014 at 12:53 pm

Viewing 6 reply threads


Ashli

July 28, 2014 at 12:53 pm

On each event I post, it says “Available Tickets” I want to market my events as registration seats so I want to change the wording from “Available Tickets” to something else. Can you tell me where I can do this at?


Lorenzo Orlando Caum

  • Support Staff

July 28, 2014 at 1:49 pm

Hi Randall,

The messaging can be changed by using the quick localization plugin or a gettext filter:

https://eventespresso.com/wiki/how-to-change-wording-with-poedit/#plugins

Let us know if this works for you.


Lorenzo


Ashli

July 28, 2014 at 4:14 pm

This worked perfectly! Thank you so much for your help.


Ray

July 30, 2014 at 8:21 pm

Hi – I can’t seem to get this to work. I tried both the plugin and the custom function. Any ideas on why this could be happening? I’m using The7 theme. Thanks.


Ray

July 30, 2014 at 8:21 pm

I’m also using EE4.


Josh

  • Support Staff

July 30, 2014 at 9:28 pm

Hi Ray,

Can you post the code you tried into a gist or a pastebin and share the link here so we can investigate?


Ray

July 31, 2014 at 8:06 am

Hi – yes, I tried two things.
1) I installed the Quick Localization plugin and inputted the following in the boxes:
old: Ticket
new: Seat
Domain: event_espresso

This did nothing.

2) I inserted the following code into my theme’s functions.php file (tried both child theme and the main theme)
function mycustom_filter_gettext( $translated, $original, $domain ) {

// This is an array of original strings
// and what they should be replaced with
$strings = array(
‘Ticket’ => ‘Seat’,
‘Confirm and go to payment page’ => ‘Complete registration’,
‘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 );

Viewing 6 reply threads

The support post ‘Change Available Tickets wording’ 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