Support

Home Forums Event Espresso Premium translation issues

translation issues

Posted: June 26, 2014 at 12:54 pm

Viewing 11 reply threads


Olivier Tarbes

June 26, 2014 at 12:54 pm

Hello,

I’m trying to translate the plugin in french,
however, it seems that some text are not foundable by the translate plugin I’m using :

– Full description of your purchases and registration information. Print it, download it, cherish it
> I looked in the code, it seems that the context is not specified

– Registration Details:
> I found it without semi-colon, translation is not working, can’t find it in the code, I thought maybe the default pages , but no luck …

Can you help me with this ?

Thanks !!


Lorenzo Orlando Caum

  • Support Staff

June 26, 2014 at 4:03 pm

Hi,

Could you give this a try:

add_filter ('FHEE__payment_overview_template__order_conf_desc', 'override_confirmation_text');

function override_confirmation_text() {
    return 'Change this message to new instructions';
}

It can go into your child themes functions.php file or a site specific plugin:

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


Lorenzo


Lorenzo Orlando Caum

  • Support Staff

June 26, 2014 at 4:04 pm

– Registration Details:
> I found it without semi-colon, translation is not working, can’t find it in the code, I thought maybe the default pages , but no luck …

Could you tell me more about the question above — is a screenshot or a link available?


Lorenzo


Olivier Tarbes

June 26, 2014 at 6:48 pm

I could send you a screenshot by email for this one, I dont see any file uploader in the forum


Lorenzo Orlando Caum

  • Support Staff

June 26, 2014 at 7:16 pm

Could you upload to WP media and link to it here?


Lorenzo


Olivier Tarbes

June 27, 2014 at 8:32 am

nice workaround 😉

here : http://dependancemontreal.ca/?attachment_id=4121

you’ll see the “cherish it” and the “Registration detail”

there is also the : “for :” that we don’t find for translation


Lorenzo Orlando Caum

  • Support Staff

June 27, 2014 at 10:24 am

What happens when the following is added to your site?

https://eventespresso.com/topic/translation-issues-2/#post-104215


Lorenzo


Olivier Tarbes

July 2, 2014 at 12:11 pm

Hello,

yes it’s working, so there weas 3 items I was not able to translate :

– the on you just solved

– the “Registration Detail :” , on the same screen

– the “for: {event_name}” , on the same screen also

Can you help me with these one too ?

Thanks


Lorenzo Orlando Caum

  • Support Staff

July 2, 2014 at 2:35 pm

Hi Olivier,

Could you give this a try:

function ee_change_thank_you_page_details( $translated, $original, $domain ) {
 
    $strings = array(
        'Registration  Details:' => 'Change me 1',
        'for: ' => 'Change me 2',
    );
 
    if ( isset( $strings[$original] ) ) {
        $translations = &get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
 
    return $translated;
}
 
add_filter( 'gettext', 'ee_change_thank_you_page_details', 10, 3 );


Lorenzo


Olivier Tarbes

July 2, 2014 at 3:32 pm

Nice, it’s working but only for the Registration Details, not for the “for :”


Lorenzo Orlando Caum

  • Support Staff

July 2, 2014 at 4:50 pm

Alright, please replace the code snippet that I shared before with these:

function ee_change_thank_you_page_details_registration_details( $translated, $original, $domain ) {
 
    $strings = array(
        'Registration  Details:' => 'Change me 1',
    );
 
    if ( isset( $strings[$original] ) ) {
        $translations = &get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
 
    return $translated;
}
 
add_filter( 'gettext', 'ee_change_thank_you_page_details_registration_details', 10, 3 );


function ee_change_thank_you_page_details_for($phrase)
{
    $post = get_the_id();
    if ($post == 286 ) {
        $phrase = str_replace('for:', 'Change me to soemthing new', $phrase);
        return $phrase;
    }
    else {
        return $phrase;
    }
}
add_filter('the_content', 'ee_change_thank_you_page_details_for', 200);

Be sure to update the post id of 186 to the post id for your Event Espresso thank you page. This numeric value appears at the end of the URL when you are viewing the page in the WordPress admin.


Lorenzo


Olivier Tarbes

July 3, 2014 at 9:58 am

ouch! this is a bit hardcore !

but it’s working 😀

Thanks for your support anyway !

Viewing 11 reply threads

The support post ‘translation issues’ 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