WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
[resolved] Links broken with qTranslate (8 posts)

  1. bkatrin
    Member
    Posted 1 year ago #

    I have qTranslate installed (main WP language German, 2ndary language English). Hence the links generated by The Events Calendar are:
    myUrl.com/events/bevorstehend (event list, upcoming events)
    myUrl.com/events/monat (month, calendar view)
    etc.

    However, when I view the page in English, the links are "translated" to
    myUrl.com/events/upcoming and
    myUrl.com/events/month
    - which do not exist, see above.

    This is due to the following: In link.php, the functions tribe_get_gridview_link et.al. have the links hardcoded. IMO, this is a bug: Either, the permalinks should always be the English ("upcoming", "month", ...; no translation of the permalinks), or the functions in link.php should take translation into consideration the same way it is done when generating the permalinks.

    Workaround: Open link.php and edit the calls
    $output = $tribe_ecp->getLink('month', false, $term); to $output = $tribe_ecp->getLink('monat', false, $term);
    (just exchange the English word with the appropriate German word that suits your permalink structure). Your workaround will break the next time you update The Events Calendar, since the link.php file will be overwritten by the update.

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    Glad to hear you found a workaround here, bkatrin. Thanks for sharing this. We were previously under the assumption that this was a Qtranslate issue (http://tri.be/support/forums/topic/tribe-events-calendar-links-and-qtranslate-plugin/) but based on your note I'm going to see if our devs have a way to incorporate your tweak into the codebase, so it isn't lost on future updates. No guarantees but I have logged this with them and as long as it doesn't create an unwanted conflict, we should be able to work it in without issue.

    Sounds like you're all set here for now, and I'm adjusting the status of this ticket to reflect that, but please let me know if we can do anything else.

  3. bkatrin
    Member
    Posted 1 year ago #

    Sorry to disappoint you - the "solution" I outlined didn't work out all the way through as I found out later (but slovenly forgot to update in this issue) :-/

    But thanks for the link to the qTranslate thread, I'll try that method!

    Whichever of either (qTranslate or Events Calendar) fixes the problem - I guess users will just be happy if it works out of the box :)

  4. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    We're hoping that the 3.0 release eases out-of-the-box compatibility with qTranslate, too.

  5. heartbox
    Member
    Posted 1 year ago #

    Hello bkatrin,

    I don't know if you ever fixed this, but what I've found might help someone else so I post it anyway... Qtranslate gives you an handy function to convert URLs, so let's say you have the events/ folder inside your theme folder (to customize The Event Calendar), just wrap tribe_get_gridview_link(), tribe_get_listview_link() and tribe_get_event_link() functions inside a qtrans_convertURL function, like this for example:

    <?php echo qtrans_convertURL(tribe_get_gridview_link()); ?>

    Hope this is clear enough!

    Bye
    M

  6. jonahcoyote
    Member
    Posted 1 year ago #

    Thanks for sharing that heartbox! Hopefully it will help others.

  7. Sky Golden
    Member
    Posted 12 months ago #

    Hi, has anyone tried wrapping those three functions with the qtranslate function as heartbox mentioned? Any luck that it's working now?

  8. heartbox
    Member
    Posted 11 months ago #

    Hi Sky,

    I tried it and I'm currently using it. It works but I ended up translating only certain pages (like single events) because it's not a method you can rely on 100%, it's more a quick fix actually...
    Hope you'll be able to find a way that suits you best, but if you need a solid solution you'd probably wait for v3.0 as Rob said.
    Don't be afraid on contacting these guys for problems anyway, they have a good support system ;) I say it for personal experience.

    hb

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic