• Resolved Carlos Blázquez

    (@carlosblazquez4global)


    Hi!

    We are using your awesome plugin in our multi language site, and we had to apply a patch to fix some badly formed URLs in the buttons to switch between list view and month view.

    Badly formed URLs look like this:

    domain.tld/(<iso-lang-code>)/events-slug/list

    domain.tld/(<iso-lang-code>)/events-slug/month

    And we make this fix:

    function impeka_child_tribe_rewrite_canonical_url ( $resolved ) {
    $pattern = ‘/\([A-Za-z0-9]+\)\//i’;
    return preg_match( $pattern, $resolved ) === 1 ? preg_replace( $pattern, NULL, $resolved ) : $resolved;
    }
    add_filter( ‘tribe_rewrite_canonical_url’, ‘impeka_child_tribe_rewrite_canonical_url’ );

    To remove the (<iso-lang-code>)/ part.

    Our kernel, theme and plugins are up to date, and we are currently using Polylang for multi language support.

    Is this a bug, maybe?

    Grettings!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor GeoffBel

    (@geoffbel)

    Hey @carlosblazquez4global

    Thank you for reaching out.
    What multi-language solution are you using?

    It looks like there is only Spanish in the example you shared.

    With that in mind, we are indeed working on a revamp of how we handle language in our URL so it would be great to make sure your use case is handled.

    Hang in there!
    Geoff

    Thread Starter Carlos Blázquez

    (@carlosblazquez4global)

    Hi, @geoffbel.

    Now we are using Polylang for multi language support, but initially we were using WPML.

    There are two active languages on the site: Spanish and English; but there isn’t language swittcher due to lack of translations. And main language pages (Spanish) don’t have iso-lang-code slug on their URL. So, front pages are:

    /
    /en/

    Thanks for your support!

    Plugin Contributor GeoffBel

    (@geoffbel)

    Hey @carlosblazquez4global

    Thank you for writing back.
    Technically speaking, Polylang is in charge of providing compatibility with our plugin.

    What I do know is that Polylang Pro is required for The Events Calendar compatibility.
    I would recommend reaching out to them about this.

    Best,
    Geoff

    Plugin Support Abz

    (@abzlevelup)

    Hi @carlosblazquez4global,

    We haven’t heard from you in a while, so I’m going to mark this as resolved. Feel free to start a new thread if you have any more questions.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Badly URL for month view in multi language site’ is closed to new replies.