Unable to get language changes to apply

Home Forums Calendar Products Events Calendar PRO Unable to get language changes to apply

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1344810
    Luke Kenny
    Participant

    My goal is to replace the term “RSVP” with “Reservation”

    The site is based in Australia, so language is set to English (Australia) en_AU.

    I am following the instructions here: https://theeventscalendar.com/knowledgebase/how-to-override-plugin-language-files/

    In wp-config.php, I have set:

    define ('WPLANG', 'en_AU');

    I downloaded the files the-events-calendar-en_AU.po and the-events-calendar-en_AU.mo from /wp-content/plugins/the-events-calendar/lang.

    I then used POEdit to edit the po file, adding the new translation text – for example where it said “Source Text: You can’t RSVP more than the total remaining tickets.” I added to Translation “You can’t reserve more than the total remaining tickets.”

    I then save the PO and selected Compile to MO…, then uploaded both files back to /wp-content/languages/plugins as per the instructions.

    But nothing changes. Any advice would be appreciated!

    #1345230
    Geoff B.
    Member

    Good evening Luke and welcome back!

    Thank you for reaching out to us.

    We are sorry to hear about the translation files not working to your liking.
    I would love to help you with this topic.

    When translation file strings are not kicking in, it is usually caused by one of the following things:

    1. Your translation files are not up to date
    2. You are using some customized translation files that have been placed in the /wp-content/languages/ or /wp-content/languages/plugins/ folder. These might not be updated and will override any other file.
    3. The strings are translated, but are considered “fuzzy”

    In the first 2 cases, the solution is to update your translation files using the pot file. You can do this by using the Poedit software and heading to Catalog > Update from pot file.

    In the last case, you will need to make them “unfuzzy” using Poedit.

    For the record, this can be the case even with freshly downloaded language files sometimes.

    Another approach would be to use a code snippet.

    You could apply the following snippet in the functions.php file of your theme (without the PHP tag at the top): https://gist.github.com/GeoffEW/0e6fe4cf5fb894f034caa9bd7887b6bf

    Let me know how that goes.

    Best regards,
    Geoff B.

    #1345268
    Luke Kenny
    Participant

    Thanks for this Geoff,

    Rather than persist with the translation approach, I’m using your code which works OK.

    There are still a couple of places “RSVP” appears. I’m wondering if you could advise if these can be updated with code also:

    1. If the user opens an event they already have an RSVP for, the string “You have 1 RSVP for this Program. View your RSVPs” is printed.

    2. Immediately after the user clicks the Confirm RSVP (now Confirm Inquiry) button, a message in a box appears that says “Your RSVP has been received! Check your email for your RSVP confirmation.”

    Any additional help you can provide here would be greatly appreciated!

    #1345843
    Geoff B.
    Member

    Good evening Luke,

    Thank you for writing back.

    Both approaches should work, but in the end I am mostly glad you like the snippet approach.

    You can totally add strings to the snippet to suit your needs.

    1. Add a coma at the end of line 8 of the snippet
    2. Add the “You have %s for this %s.” string and the desired translation
    3. Add a coma at the end that line
    4. Add the “Your RSVP has been received! Check your email for your RSVP confirmation.” string and the desired translation

    Let me know how that goes.

    Best regards,
    Geoff B.

    #1356244
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Unable to get language changes to apply’ is closed to new replies.