Support

Home Forums Custom Files Add-on (EE3) Change 'Register' to 'Buy Tickets'

Change 'Register' to 'Buy Tickets'

Posted: February 4, 2013 at 10:59 am

Viewing 4 reply threads


Petra Griffiths

February 4, 2013 at 10:59 am

Is it possible to change the text on the ‘Register’ button to ‘Buy Tickets’ instead?

Is it also possible to remove the ‘Add to Cart’ link?


Jonathan Wilson

February 4, 2013 at 1:10 pm

Hello Petra,

The language files are now in a public Github repo (https://github.com/eventespresso/languages).

You can follow these instructions on modifying text with Poedit: https://eventespresso.com/wiki/how-to-change-wording-with-poedit/


Petra Griffiths

February 8, 2013 at 9:48 am

Hi Jonathan,

I looked at the instructions you referred to. I may be being stupid but, when I download and open the languages folder, the only file there seems to be an index.php file.

So there are no .po files to edit.


Josh

  • Support Staff

February 8, 2013 at 12:01 pm

Hi Petra,

The language files are now over at Github and can be dowloaded here:

https://github.com/eventespresso/languages

I can suggest an alternate method that doesn’t involved downloaded, editing, and re-uploading language files though. If you’re comfortable with editing PHP files, there’s a WordPress filter hook you can use to change text strings. Alex Mills wrote how to use it here:

http://www.viper007bond.com/2011/07/13/changing-core-wordpress-strings/

In your case, you’d add the following code to either your theme’s functions.php file or if you have the custom files add-on installed, the custom_functions.php file:

function myee_filter_gettext( $translated, $original, $domain ) {

    $strings = array(
        'Register' => 'Buy Tickets',
        // Add some more strings here
    );

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

    return $translated;
}

add_filter( 'gettext', 'myee_filter_gettext', 10, 3 );

The Add to cart link can be removed by deactivating the Multi Event Registration add-on.


Petra Griffiths

February 11, 2013 at 9:47 am

Thanks Josh, both changes work fine!

Viewing 4 reply threads

The support post ‘Change 'Register' to 'Buy Tickets'’ 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