Posted: 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” |
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/ — |
|
|
Screenshots: The words have to change are in a black box. 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. |
|
Sorry load bad image |
|
|
|
|
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? |
|
|
But it does not have to do |
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? |
|
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? — |
|
|
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 |
|
it’s like not to use the mo / po file to translate . I ‘m doing wrong? |
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? |
|
|
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. |
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? |
|
|
If that’s just what I want. Thanks I ‘ll try. Thanks. |
Great. Let us know whether that works for you! |
|
|
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 |
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. |
|
|
|
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. |
|
Hi Carlos, it looks like it was added within an existing function. Try relocating it towards the end of the file and saving changes. — |
|
|
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 . |
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 — |
|
|
If it works perfect. Thank you. |
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. — |
|
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.