Posted: February 10, 2015 at 2:39 pm
|
I am using EE4.6.4 and trying to replace text “Attendee” but it not replace, I have applied all of the below link methods. |
Hi mhackman, Which instance of ‘Attendee’ are trying to change? To note simple traslating ‘Attendee’ to ‘Registrant’ (for example) does not translate that string within a string… So doing the above would only change ‘Attendee’ is that is all that was in that string, a string such as ‘Attendee Information’ is another string and must be translated as separately. |
|
|
I have replace all the strings which contains ‘Attendee’ using .po file using Poedit, and uploaded .mo file to upload/espresso/languages $strings = array( if ( isset( $strings[$translation] ) ) { return $translated; add_filter( ‘ngettext’, ‘youruniqueprefix_filter_gettext’, 10, 5 ); but anything did not worked |
Hi, I think you are wanting to replace the word “Attendee” with a new word. That isn’t how the gettext filter works. It needs an exact match. For example, your gettext filter would translate this phrase: %d Attendee …but it would not translate this one: My Attendee will be arriving early for my event. Can you post a screenshot of the are that you are wanting to change? We’ll then share the exact match that is needed. https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots A link to the page with the text would also work. Thanks — |
|
|
I am trying to replace this test using this code snippet $strings = array( if ( isset( $strings[$translation] ) ) { return $translated; add_filter( ‘ngettext’, ‘youruniqueprefix_filter_gettext’, 10, 5 ); Help me in this regard |
The string you need to translate is ‘Attendee %d’. So change this line: ‘Attendee’ => ‘Participants’ To this ‘Attendee %d’ => ‘Participant %d’ The %d is the place holder for the actual number. |
|
|
Still it is not replacing the text |
The snippet of code you are using is not the one provided on this page: https://eventespresso.com/wiki/how-to-change-wording-with-poedit/ The snipped above is throwing errors. Try using this: https://gist.github.com/Pebblo/4c819243acfee1ce36b1 Which is the snippet from our tutorial page, with the correct strings input. You can add this to your themes functions.php file or a site specific plugin |
|
|
Thanks a lot. issue has been resolved |
The support post ‘Replacing text "Attendee" is not working’ 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.