Support

Home Forums Event Espresso Premium Quick localisation – changing the word 'ticket'

Quick localisation – changing the word 'ticket'

Posted: January 9, 2015 at 4:40 pm

Viewing 11 reply threads


hoffman

January 9, 2015 at 4:40 pm

I used the quick localisation plugin to change some the default descriptions to those that make more sense for this client (the word ‘ticket’ just doesn’t work in this instance). However, I can’t pinpoint the word ‘ticket’ that appears by the price: http://screencast.com/t/FsYV6R4c43L

Happy to hide via CSS but that doesn’t seem easy to target as it seems to wipe out the qty radio button as well. Is it .smaller-text ?

I also need to remove the ‘qty’ as this client only allows one registration per event (I hid the #single-page-checkout .spco-attendee-wrap-fs #spco-auto-copy-attendee-pg)

Having used EE on three different installations I’m finding that more of these simpler customisations should be configurable from the plugin backend or through an interface where the user can update the required field descriptions.


Lorenzo Orlando Caum

  • Support Staff

January 9, 2015 at 6:11 pm

Hi, we don’t have any plans to add these edits as settings to the core plugin but we are considering an add-on to help with this. The difficult part becomes deciding what will be helpful.

See the second line in this example for the entry:

https://gist.github.com/lorenzocaum/b4bbd1bb839a1c80b2b4

Then you can add that to the quick localization plugin and save changes.


Lorenzo


hoffman

January 14, 2015 at 4:16 am

Hi

could you please elaborate on the instructions, I couldn’t see which line you meant to remove this last ‘ticket’

Thanks


Dean

January 14, 2015 at 4:51 am

Hi,

The string for the ticket in question would be ” / ticket” (without the quotes, but with the spaces).


Tony

  • Support Staff

January 14, 2015 at 5:07 am

Either of those functions linked is intended to be added to your themes functions.php file or a site specific plugin and should change all instances of ‘ticket’ to either ‘registration’ or ‘entry’ depending on which function you use.

Within those functions is an array of strings, it is an associative array meaning you assign the original string to the array ‘key’ and pass the translated string as the ‘value’.

For example:

$strings = array(       
        'Available Tickets' => 'Available Entries',
        ' / ticket' => ' / entry'
)

In that example two strings would be translated, ‘Available Tickets’ would translate to ‘Available Entries’ and ‘ / ticket’ to ‘ / entry’.

However if you prefer to simply use the Quick Localization plugin, you can the value on the left and use that for the ‘Old’ string, then the value on the right and use that for the ‘New’ string, domain is still event_espresso.

In this case it you must use ‘ / ticket’ (the leading space and / are needed as the original string must match exactly) for the ‘Old’ value within quick localization if you prefer not to use one the functions @Lorenzo posted.

Does that help?


hoffman

January 19, 2015 at 11:39 am

Thanks I have been able to adjust this. The client isn’t happy with the big “congratulations” on registration either, it’s not really suitable for the type of events they sell. Can that also be changed with the localisation plugin?


Lorenzo Orlando Caum

  • Support Staff

January 19, 2015 at 1:26 pm

Hi, we can also help you with that.

Here is the full message for translation purposes:

%sCongratulations%sYour registration has been successfully processed. Check your email for your registration confirmation or click the button below to view / download / print a full description of your purchases and registration information.

Here is a tutorial on changing the message using a filter:

https://gist.github.com/lorenzocaum/b0fef298c2ecb2965353


Lorenzo


hoffman

January 20, 2015 at 1:58 pm

Hi

Thanks for that. Do I add this to my child functions.php? I had some customisations on another install and it caused an issue with every update.


Lorenzo Orlando Caum

  • Support Staff

January 20, 2015 at 2:08 pm

Hi, if this is a child theme, then PHP code snippets in the functions.php should not be creating any issues.

One of the issues that a child theme solves, is that it allows you to update the parent theme without your customizations being lost.

If you are experiencing something different, then I would move any code snippets for Event Espresso out of your child theme’s functions.php file and into a site specific plugin:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/


Lorenzo


hoffman

January 20, 2015 at 4:07 pm

Hi

Thanks I will try this. I have commented about the incorrect use of English in EE before (it was to do with the ‘it’s’ and ‘its’ used in the additional attendees message) – in this case it should be ‘Your’ and not You’re’.

A translation function for core phrases is pretty important in a future release to avoid this.


Lorenzo Orlando Caum

  • Support Staff

January 20, 2015 at 4:24 pm

I’ve fixed the typo on my example. Thanks.


Lorenzo


hoffman

January 20, 2015 at 4:50 pm

Hi

That worked fine in the child functions.php, thanks a lot for the code.

Viewing 11 reply threads

The support post ‘Quick localisation – changing the word 'ticket'’ 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