Help Desk

Can’t seem to translate a specific string in filterbar

  • Posts: 29 Topics: 16 Answers: 1
    | Permalink

    It’s the string “Event Category” in filterbar.
    See in red:
    site URL:

    Where can I find this string to translate? There is one such string in initialize_filters() in View.php but it doesn’t see to be the right one?



    | Permalink

    Hi Ben!

    Sorry to hear you’re having a bit of difficulty here. You do have the right text string, though so you’re off to a good start. The text string is listed in the ‘lang > tribe-events-filter-view.pot’ file on line 207 if you’d like to translate it yourself.

    As an alternative you can use this snippet:

    Place it at the bottom of your theme’s function.php file taking care not to disturb any of the existing code. After that, replace the text ‘TRANSLATED TEXT HERE’ with your translation.

    That should get you set up! If you have any problem with this or have any further questions feel free to let me know!

    Happy to Help! 🌻


    Posts: 29 Topics: 16 Answers: 1
    | Permalink

    Hello again,

    I tried both ways but nothing helped. Nothing happens even when I changed in the ‘Event Category’ string in View.php in initialize_filters().

    I had to make an ugly hack where the text is output in Filter.php

                                                    // ugly hack
    						if($this->title == 'Event Category') {
    							$this->title = 'Kategori';
                                                    // end of ugly hack
    						<h3 class="tribe-events-filters-group-heading"><?php echo stripslashes( $this->title ); ?></h3>

    Could you please look into this and see if the “Event Category” string has some other origin?!


    | Permalink

    Hi Ben!

    Hm, that is odd. I was able to modify that string with the code snippet, that makes me wonder if you might have an conflict somewhere.

    Have you gone through the troubleshooting steps here at all?

    In the meantime, I will ask one of our translation specialists to confirm that you are targeting the correct string.

    Let me know what you find out and I’ll do the same.


    | Permalink

    Hi Ben!

    Thank you for your patience on this! I spoke with our translations specialist and he told me that you can change that label directly in Events -> Settings -> Filters.

    I wasn’t aware of this and it seems like the easiest way to overcome this specific issue.

    You do have the correct string but it’s possible the language files aren’t completely up to date (which would explain why it is not rendering). That is something we re working on so I hope to see a change on that front in the not-too-distant future.

    I hope this helps! Let me know if I can do anything else for you.


    Posts: 65
    | Permalink

    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

    | Permalink