Monthly view page title (text translation) problem

Home Forums Calendar Products Events Calendar PRO Monthly view page title (text translation) problem

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1452504
    Michal
    Participant

    Hi,

    I try to customize events calendar pro and I want to change text shown in the events page title right above the calendar grid saying “(Events) for (Month) (Year)”. I would like to change a word “for” in this sentence into a different phrase in polish language.

    I had no problems with changing any other messages by adding new translations or modifying existing translations in po files (the-events-calendar-pl_PL.po for moth view and day view) and (tribe-events-calendar-pro-pl_PL.po for other views) and than compiling them to .mo files using Poedit software.

    However I cannot find where to change this one phrase “(Events) for (Month) (Year)” in month view. I set translation for a “%s for” phrase but it doesn’t work. Could you tell me – I don’t know – maybe which line in which .po file i have to edit or could you tell me in which .php file i can find the original to change it permanently?

    Thanks in advance,
    Michal

    #1453188
    Sky
    Keymaster

    Michal,

    Unfortunately, the word “for” is hard coded in there. However, we can customize the output using a PHP snippet.

    Here is the snippet I created for you: https://gist.github.com/skyshab/52bfd22ef4bdb20bf08e2a658bc953b9. This will allow you to edit the title on the Month view. You can replace “for” with whatever you’d like on line 11.

    This could be added either to a custom plugin or else to your theme’s functions.php file.

    Let me know if this helps.

    Thanks,
    Sky

    #1453460
    Michal
    Participant

    Hello Sky!

    Thank you very much for your answer and a solution. IT WORKS! 🙂 I added your snippet into functions.php of my WordPress theme and everything works perfect!

    Thanks a lot once again!

    Cheers,
    Michał

    #1460970
    Sky
    Keymaster

    Michal,

    Awesome! Glad I could help.

    Sky

    #1481300
    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 ‘Monthly view page title (text translation) problem’ is closed to new replies.