Support

Home Forums Event Espresso Premium Translation-problem with button to proceed to finalize registration

Translation-problem with button to proceed to finalize registration

Posted: June 14, 2019 at 7:30 am

Viewing 1 reply thread


speedpartner

June 14, 2019 at 7:30 am

Hi,

customer just informed us that the final button looks odd in the German translation. The button-text read (in German) “Weiter zur Jetzt kostenpflichtig buchen”. But the “Weiter zur” is somehow odd there, without it the button would make sense. Did that change with some recent update maybe?

The strings we use so far which seem affected here are:

#: event-espresso-core/modules/single_page_checkout/inc/EE_SPCO_Reg_Step.class.php:211
msgid “Proceed to %s”
msgstr “Weiter zur %s”

#: event-espresso-core/modules/single_page_checkout/reg_steps/finalize_registration/EE_SPCO_Reg_Step_Finalize_Registration.class.php:27
msgid “Finalize Registration”
msgstr “Jetzt kostenpflichtig buchen”

Kind regards,
Stefan Neufeind


Josh

  • Support Staff

June 14, 2019 at 1:46 pm

Hi,

This did not change in a recent update. What you can do is add a filter function to change the text to your specifications. Here’s a code snippet as an example:

function ee_finalize_registration_button(
    $text,
    EE_Checkout $checkout
) {
    if (
        ! $checkout instanceof EE_Checkout ||
        ! $checkout->current_step instanceof EE_SPCO_Reg_Step ||
        ! $checkout->next_step instanceof EE_SPCO_Reg_Step
    ) {
        return $text;
    }
    if (
        $checkout->next_step->slug()
        == 'finalize_registration'
    ) {
        $text = 'Jetzt kostenpflichtig buchen';
    }
    return $text;
}

add_filter (
    'FHEE__EE_SPCO_Reg_Step__set_submit_button_text___submit_button_text',
    'ee_finalize_registration_button',
    10,
    2
);

The recommended place to add code snippets like this one is into a site specific plugin. You can learn how to add a site specific plugin by following this guide:
https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Viewing 1 reply thread

The support post ‘Translation-problem with button to proceed to finalize registration’ 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