Support

Home Forums Translations Untranslated Items

Untranslated Items

Posted: April 28, 2015 at 2:16 am

Viewing 2 reply threads


Gonçalo Pereira

April 28, 2015 at 2:16 am

Hi!

I’m having some problems with the translation because there are elements that remain untranslated. for example, on this page:

http://apu.pt/events/

“Upcoming Date(s) and Time(s)” and “Event Details”

I’m working with the latest version of your files available at: http://translate.eventespresso.com/projects/event-espresso-4

Where can I translate this sentences?

Thanks


Lorenzo Orlando Caum

  • Support Staff

April 28, 2015 at 8:42 am

Hi Goncalo,

That messaging is specific to the theme. Try a gettext filter:

function ee_mycustom_filter_gettext( $translated, $original, $domain ) {
 
    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'Upcoming Date(s) and Time(s)' => '',
        'Event Details' => '',
    );
 
    // See if the current string is in the $strings array
    // If so, replace its translation
    if ( isset( $strings[$original] ) ) {
        // This accomplishes the same thing as __()
        // but without running it through the filter again
        $translations = get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
 
    return $translated;
}
 
add_filter( 'gettext', 'ee_mycustom_filter_gettext', 10, 3 );

It can be added to your child themes functions.php file or a site specific plugin.

https://eventespresso.com/wiki/how-to-change-wording-with-poedit/#custom-function


Lorenzo


Gonçalo Pereira

April 28, 2015 at 9:55 am

Hi Lorenzo!

Thank you very much for your reply.
I’m going to try your solution.

Thanks

Viewing 2 reply threads

The support post ‘Untranslated Items’ 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