Support

Home Forums Event Espresso Premium EE4 keys don't translate

EE4 keys don't translate

Posted: January 30, 2015 at 8:30 am

Viewing 9 reply threads


pyramidal

January 30, 2015 at 8:30 am

Hello,

I’ve changed also my WordPress(4.1) installation to German (as described here: https://eventespresso.com/wiki/how-to-change-languages/ ). WordPress and part of 4.6.0.beta.144 is now German.
I created the directory ../wp-content/uploads/espresso/languages and downloaded the German mo/po files from Glotpress, modified the file name and it almost works.

I made translations with Poedit and uploaded them. Still a part of the keys that I translated and uploaded won’t appear.
For example the button “Proceed to paiement option”, the steps like “Attendee Information”, “Please answer all required questions correctly before proceeding.” when trying to valid the form with errors.

Strings like “This field is required.” I translated in custom questions won’t appear either.

Is it because of EE or did I missed something?

Regards,
Pyramidal.


Lorenzo Orlando Caum

  • Support Staff

January 30, 2015 at 12:13 pm

Hi there Pyramidal,

This field is required.

The field above not translating is a known issue that will be corrected before the final version of Event Espresso 4.6 is released. We are aiming for mid-February.

There may also be some strings that don’t translate as they may have been changed. We do plan on updated the language files prior to release.

For now, they can be changed via a gettext filter. Can you share a screenshot of the area that you are running into an issue with?

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


Lorenzo


pyramidal

January 31, 2015 at 5:01 am

Hi Lorenzo,
At this time I just try to translate the public part of a single event. (I did not try to translate the admin panel)
For example of the popups don’t translate. Since the registration of our event will be in a week, i’d be happy to know where and how I’ll have to add filters 🙂
Thx for you help!

http://anmeldung.kleinkunst-ka.de/wp-content/uploads/2015/01/Bildschirmfoto-2015-01-31-um-12.47.05.png
http://anmeldung.kleinkunst-ka.de/wp-content/uploads/2015/01/Bildschirmfoto-2015-01-31-um-12.49.18.png
http://anmeldung.kleinkunst-ka.de/wp-content/uploads/2015/01/Bildschirmfoto-2015-01-31-um-12.49.08.png
http://anmeldung.kleinkunst-ka.de/wp-content/uploads/2015/01/Bildschirmfoto-2015-01-31-um-12.48.03.png
http://anmeldung.kleinkunst-ka.de/wp-content/uploads/2015/01/Bildschirmfoto-2015-01-31-um-12.47.23.png


Dean

February 2, 2015 at 6:48 am

Hi,

Those images require log in details to view.


pyramidal

February 2, 2015 at 8:04 am

Hey, Oh sorry, It should be ok now!


Lorenzo Orlando Caum

  • Support Staff

February 2, 2015 at 7:11 pm

Hi, those screenshots were helpful.

Try this sample coding:

//* Change messaging for Event Espresso 4
function ee_46_messaging_changes( $translated, $original, $domain ) {
 
    $strings = array(
        'Attendee Information' => 'New message here',
        'Payment Options' => 'New message here',
        'Important information regarding your payment' => 'New message here',
        'The Attendee Information Step has been successfully completed.' => 'New message here',
        'Please select a method of payment and provide any necessary billing information before proceeding.' => 'New message here',
        'Please answer all required questions correctly before proceeding.' => 'New message here',
    );

    if ( isset( $strings[$original] ) ) {
        $translations = &get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
 
    return $translated;
}
 
add_filter( 'gettext', 'ee_46_messaging_changes', 10, 3 );

It can be added to your child theme’s functions.php file (do not include the opening php tag) or a site specific plugin:

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

Be sure to change “New message here” for each line.

Please see this tutorial for how to change the button text:

https://eventespresso.com/wiki/customize-checkout-registration-button-text/


Lorenzo


pyramidal

February 3, 2015 at 9:04 am

Hi,

Thx! So I made a new Plugin and it work partially:
– I followed the Buttons tutorial.. and most of them don’t translate or half.

Here my plugin: http://anmeldung.kleinkunst-ka.de/wp-content/uploads/2015/02/ee-anmeldung-customs.txt

Here what I mean in screenshots:
http://anmeldung.kleinkunst-ka.de/wp-content/uploads/2015/02/EE-screenshots.zip

Thanks in advance


Lorenzo Orlando Caum

  • Support Staff

February 3, 2015 at 10:58 am

Hi,

Try these additional gettext filters:

//* Update the messaging for the congratulations messaging that appears at the top of the thank you page
add_filter( 'FHEE__thank_you_page_overview_template__order_conf_desc', 'ee_change_thank_you_page_congratulations_messaging' );
function ee_change_thank_you_page_congratulations_messaging() {

 return 'New message here';
}

//* Change messaging for Event Espresso 4
function ee_46_messaging_changes_extras( $translated, $original, $domain ) {
  
    $strings = array(
        'Attendee #%s' => 'New message here',
        'You have selected "%s" as your method of payment. Please note the important payment information below.' => 'New message here',
        'Please wait while we process your registration.%sDo not refresh the page or navigate away while this is happening.%sThank you for your patience.' => 'New message here',
    );
 
    if ( isset( $strings[$original] ) ) {
        $translations = &get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
  
    return $translated;
}
  
add_filter( 'gettext', 'ee_46_messaging_changes_extras', 10, 3 );

The text for the buttons can be changed through the messages editor (toggle the text view).


Lorenzo


pyramidal

February 12, 2015 at 2:16 am

Hi,

So I’m now using EE 4.6.5 and tried those Filter: still problems 🙁
Attendee 1, 2 ..etc. won’t translate.
The text for the buttons: I used your tutorial about buttons, like in the screenshots It partially worked. I still have “Proceed to” before “Kasse” instead of my translation. Proceed to Finalize Registration too.
I didn’t find another editor for it.
A little “for” is also still here. (“For” EVENT_NAME on the payment page)

Thx for your help


Josh

  • Support Staff

February 16, 2015 at 9:31 am

Hi there,

Can you post the current code that you are using in a pastebin, a gist, or a link to a txt file like you did before so we can investigate?

Viewing 9 reply threads

The support post ‘EE4 keys don't translate’ 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