Support

Home Forums Event Espresso Premium Text Translations

Text Translations

Posted: May 21, 2015 at 3:44 pm

Viewing 8 reply threads


Kirstin

May 21, 2015 at 3:44 pm

Hello –

I am attempting to change many of the the wording of several things within Event Espresso. I added the following to my custom functions plugin but it is not working for all the translations. Please advise.

function ee_custom_messaging_events_classes( $translated, $original, $domain ) {
$strings = array(
‘Event Dates’ => ‘Class Dates’,
‘Event Location’ => ‘Class Location’,
‘Select a Venue’ => ‘Select a Location’,
‘Ticket’ => ‘Class’,
‘Confirm and go to payment page’ => ‘Complete registration’,
‘No events available…’ => ‘No upcoming classes at this time…’,
‘Attendee’ => ‘Skater’,
‘Upcoming Events’ => ‘Upcoming Classes’,
);

if ( isset( $strings[$original] ) ) {
$translations = get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}

return $translated;
}

add_filter( ‘gettext’, ‘ee_custom_messaging_events_classes’, 10, 3 );


Lorenzo Orlando Caum

  • Support Staff

May 21, 2015 at 4:05 pm

Hi, please provide specific information on which areas are not working.

Screenshots would be helpful.

https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots

Thanks


Lorenzo


Kirstin

May 21, 2015 at 6:54 pm

After upgrading to the latest version of EE4 all my events are suddenly returning a 404 error… no idea why. I didn’t change anything. But here is a screen grab from earlier.

https://app.box.com/s/4husqsmy6gtowdqalpnk2ejebh3akuve

I would like the following changes:

Available tickets => Register Now
Upcoming Events => Upcoming Classes

Under the “Price” field I would like it to say $60/class

In addition, I would like the date times to show all dates including expired.

And, I would like to remove the *Please note the maximum number…. ”

Thank you


Dean

May 22, 2015 at 4:39 am

Hi,

Available tickets => Register Now

This just needs to be added to the function you wrote earlier. Screenshot http://take.ms/ojUgf

Upcoming Events => Upcoming Classes

Got to Appearance > Widgets > find the widget and change the title wording.

Under the “Price” field I would like it to say $60/class

Add ' / ticket' => ' /class' to your function

Add .currency-code { display: none; } to your CSS to hide the currency code.

In addition, I would like the date times to show all dates including expired.

It could be done, but would require some file edits, possibly to core files.

And, I would like to remove the *Please note the maximum number…. ”

More CSS

.tkt-slctr-tbl-wrap-dv p {
  display:none;
}

The CSS can be added to your themes style.css, though in order to preserve the CSS through theme updates we recommend adding it to either: a child themes style.css, your themes CSS options if it has any, or a plugin such as My Custom CSS.

Regarding the 404 error, is this still occurring? If so, please go to Gerneral > Permalinks and press save (to “flush” your permalinks) and check to see if that resolves it. You may also need to clear you cache if you are using any caching plugins.


Kirstin

May 31, 2015 at 3:05 pm

Dean,

Thank you, upgrading EE4 to the latest version fixed the 404 errors.

Unfortunately, the text translations are still not working. I have added the custom functions to my plugin but please see the following link –

http://0ae.f46.myftpupload.com/classes/may-jun-ltsbh-tue/

Tickets still displays instead of classes. Also please click on the register now to access the checkout page – “Attendee” is not correcting to “Skater”.

Also, is it possible to hide the dates below the registration box? And the Location tags?

And hide the “comments are closed”?

I would also like to change the “Qty*” to “Select”.

Thanks so much!


Tony

  • Support Staff

May 31, 2015 at 3:21 pm

Hi Kirstin,

When translating string, each string is considered separate, so translating ‘Tickets’ to ‘Classes’ will not also translate ‘Available Tickets’ to ‘Available Classes’.

To that you need to translate that specific string using:

'Available Tickets' => 'Available Classes',

The same applies for ‘Attendee’ and ‘Skater’, to translate this string – http://take.ms/HBM3N

From ‘Attendee *number*’ to ‘Skater *number*’ you need to use:

'Attendee %d' => 'Skater %d',

The %d is used to dynamically add the number.

Also, is it possible to hide the dates below the registration box? And the Location tags?

Can you provide details on exactly which details please. Possibly using a screenshot.

And hide the “comments are closed”?

This is provided by your sites theme, does your theme include an option to remove this?

I would also like to change the “Qty*” to “Select”.

You can do this within your function above using:

'Qty*' => 'Select*',

Does that help?


Kirstin

June 1, 2015 at 4:21 pm

Tony –

The ‘Available Tickets’ => ‘Available Classes’ still did not work. Please see screen shot https://app.box.com/s/l9rb7omjwvss8y5nao7b7sxw74j193sm

Also in this screenshot – I would like to display the dates as Startdate-Enddate starttime-endtime (i.e. May 28, 2015-June 25, 2015 5:10pm-6:55pm) instead of the line item list.

Can I remove the icon before “EVENT LOCATION”? And can I hide the category tags below this? And can I add the Location Name?

Thanks so much for your assistance!


Kirstin

June 1, 2015 at 4:28 pm

Also, is it possible to display those dates including expired dates?


Tony

  • Support Staff

June 3, 2015 at 5:27 am

Hi Kirstin,

Whilst we generally will provide small customisations on the forums such as hiding elements with CSS, translations, setting starter templates etc some of the customisations you are requesting are far more in depth and require custom templates/functions, this is not something we can provide on the forums.

I would like to display the dates as Startdate-Enddate starttime-endtime (i.e. May 28, 2015-June 25, 2015 5:10pm-6:55pm) instead of the line item list.

Altering the datetime display to how you have requested will require a custom function.

Can I remove the icon before “EVENT LOCATION”?

That can be hidden using some custom CSS:

span.ee-icon.ee-icon-venue {
  display: none;
}

Of if you want it to be specifically for the events details page:

.single-espresso_events span.ee-icon.ee-icon-venue {
  display: none;
}

We recommend using either the My Custom CSS or Reaktiv CSS Builder plugins to add custom styles such as these.

And can I hide the category tags below this?

This is likely being output by your theme, can you link me to your event page so I can take a look please?

And can I add the Location Name?

The Venue Name? That should already be displayed on your event page. If you link me to your event page I’ll take a look.

Also, is it possible to display those dates including expired dates?

This should be possible, but will change if you alter how the dates are output (as you’ll need to use a custom function). I noticed in a previous post @Lorenzo provided steps to setup the event templates, are you still using those within your theme?

The ‘Available Tickets’ => ‘Available Classes’ still did not work.

That’s odd, its working for me. Can you post up the full function you are using please? However, please don’t post it in the forum as the formatting will be changed. Please using something like http://pastebin.com/ and paste the link here so I can take a look.

Viewing 8 reply threads

The support post ‘Text Translations’ 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