Support

Home Forums Translations I do not know how to translate registration forms

I do not know how to translate registration forms

Posted: May 11, 2015 at 10:19 am

Viewing 25 reply threads


Carlos Goertz

May 11, 2015 at 10:19 am

Sorry for my English.I have looked in the forum and translated documentation as registration forms , but do not understand. I would like to change such information Attendee switch to ” Participant Details”
Billable Registrations change “Number of Tickets”.
Thanks for the help.


Lorenzo Orlando Caum

  • Support Staff

May 11, 2015 at 11:16 am

Hi Carlos, could you share some screenshots of those areas that you are wanting to translate?

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

If its just a few areas, then a gettext filter could work:

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


Lorenzo


Carlos Goertz

May 12, 2015 at 10:22 am

Screenshots: The words have to change are in a black box.

Image and video hosting by TinyPic

Image and video hosting by TinyPic

I do not understand , I would like to explain to me step by step what I have to do. In that folder I have to keep the language as I can edit . I would like to put it in English UK .

Thank you.


Carlos Goertz

May 12, 2015 at 10:23 am

Sorry load bad image

Image and video hosting by TinyPic


Carlos Goertz

May 12, 2015 at 10:24 am

Image and video hosting by TinyPic


Carlos Goertz

May 12, 2015 at 10:25 am

expresso2


Tony

  • Support Staff

May 12, 2015 at 10:35 am

Hi Carlos,

Did you download your translation files from here:

http://translate.eventespresso.com/projects/event-espresso-4

Or are you using the translations that EE provided automatically?


Carlos Goertz

May 12, 2015 at 10:37 am

But it does not have to do


Tony

  • Support Staff

May 12, 2015 at 10:55 am

I’m sorry but I don’t understand.

The strings you have highlighted above should be included within the PO file for translation, so I’m trying to find which translations files your are using.

Did you download the PO and manually translate?


Lorenzo Orlando Caum

  • Support Staff

May 12, 2015 at 10:56 am

Hi Carlos, can you confirm that you would like to keep the site in English but translate certain areas of Event Espresso to another language?

If so, you can do that by using an English translation file with the changes made or if you only have a few changes, then use a gettext filter.

Did you just need those three areas from your screenshots changed?


Lorenzo


Carlos Goertz

May 12, 2015 at 11:02 am

I download the translation and I upload po/mo files on the path wp -content / plugins / event … / languages ??and do not change the words.

I just want to change the words I put in black text boxes .

Sorry for my English


Carlos Goertz

May 12, 2015 at 11:31 am

it’s like not to use the mo / po file to translate . I ‘m doing wrong?


Tony

  • Support Staff

May 12, 2015 at 11:41 am

Can you try placing the files within /wp-content/uploads/espresso/languages/

The files should be called event-espresso-4-es_ES.po and event-espresso-4-es_ES.mo (assuming you are using the Spanish translations files)

So if you change the filesname to match the above and upload them to the new location, do the language files work?


Carlos Goertz

May 12, 2015 at 11:48 am

I do not want to switch to Spanish . I want to change it to English UK and change the words poedit . But there is no change. I safe in new location but the same.


Tony

  • Support Staff

May 12, 2015 at 12:14 pm

Hi Carlos,

I misunderstood what you were trying to do here, I do apologise.

Rather than using the MO/PO files for this you can use something like this:

function mycustom_filter_gettext( $translated, $original, $domain ) {
 
    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'Attendee %d' => 'Participant %d Details',
        'Attendee Information' => 'Participant Details',
        'Billable Registrations:' => 'Number of Tickets',
        // Add some more strings here
    );
 
    // 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', 'mycustom_filter_gettext', 10, 3 );

Add that code within your themes functions.php or a Site Specific Plugin.

That will change the strings you highlighted above so that it will look like this – http://take.ms/On5wU and http://take.ms/J9U2A

Is that what you are looking for?


Carlos Goertz

May 12, 2015 at 1:11 pm

If that’s just what I want. Thanks I ‘ll try.

Thanks.


Jonathan Wilson

May 12, 2015 at 1:13 pm

Great. Let us know whether that works for you!


Carlos Goertz

May 13, 2015 at 5:38 am

This PHP code gives me parse error.

Parse error: in /homepages/43/d462397182/htdocs/clickandbuilds/FundacinEnPi/wp-content/themes/charitas-wpl/functions.php on line 72


Tony

  • Support Staff

May 13, 2015 at 5:56 am

Can you check it matches the code above exactly please.

I’m using that code without any issue on my site.

If you prefer, copy you functions.php file to http://pastebin.com/ and add the URL here. I’ll take a look there.


Carlos Goertz

May 13, 2015 at 6:09 am

http://pastebin.com/Mnum0hxf


Tony

  • Support Staff

May 13, 2015 at 6:23 am

Its because of where the code has been placed in the file.

Remove that code completely and use this site specific plugin instead http://take.ms/H3e40

Download that and install it as any other plugin. It will add another plugin called ‘Custom EE Text Translations’ that has the same code as above but in a plugin.

Please let me know how you get on.


Lorenzo Orlando Caum

  • Support Staff

May 13, 2015 at 6:24 am

Hi Carlos, it looks like it was added within an existing function. Try relocating it towards the end of the file and saving changes.


Lorenzo


Carlos Goertz

May 13, 2015 at 7:53 am

Thank you very much works with this plugin . I try to put the code at the end of function.php but is the same.

Thanks for the resolution .


Lorenzo Orlando Caum

  • Support Staff

May 13, 2015 at 8:02 am

Hi, Tony created a site specific plugin for you. Could you download it to your computer and then upload and activate it on your WP site?

https://eventespresso.com/topic/i-do-not-know-how-to-translate-registration-forms/#post-156184


Lorenzo


Carlos Goertz

May 13, 2015 at 8:13 am

If it works perfect. Thank you.


Lorenzo Orlando Caum

  • Support Staff

September 12, 2015 at 2:58 pm

Hello again Carlos,

We have a new resource that explains how to translate Event Espresso. You can view it here:

https://eventespresso.com/wiki/how-to-translate-event-espresso/

Also, GlotPress now has translation strings that are up to date for the current Event Espresso 4.8.x platform.


Lorenzo

Viewing 25 reply threads

The support post ‘I do not know how to translate registration forms’ 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