Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Change 'Register' to 'Buy Tickets' | Event Espresso - Staging Server

Support

Home Forums Custom Files 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

  • Support Staff

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: http://staging.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

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 - Staging Server