Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Dražen Duvnjak 1 year, 7 months ago.

Assisted by: Dražen Duvnjak.

Author Posts
September 21, 2022 at 2:23 pm #12095903

shaneB-8

Hi there,

I was wondering if you could explain to me how WPML handles WP rewrite rules for displaying the proper translation? WIth polylang it uses the rewrite rule in order to determine what link to display for content this is not WP

I'm attempting to properly integrate WPML with CiviCRM (hidden link), as it presently only supports Polylang fully. When using Polylang the CiviCRM links will properly show the other translated pages in the language switcher.

For WPML this isn't really happening. I setup two rewrite rules, but the language switcher is still not properly displaying the link.

Here's an example

hidden link

Should go to
hidden link

Rewrite rules are

'^civicrm/([^?]*)?' => 'index.php?page_id=5&civiwp=CiviCRM&q=civicrm%2F$matches[1]'
'^fr/civicrm/([^?]*)?' => 'index.php?page_id=5&civiwp=CiviCRM&q=civicrm%2F$matches[1]'

September 23, 2022 at 7:57 am #12108987

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for the patience.

I have checked further and can see author of the plugin is also saying this will need some work and adjustment to their plugin code in order for WPML to work correctly.

>Support for Polylang has more coverage than WPML. You'll need to look at this code and replicate for WPML using its methods to discover what's needed to modify the Rewrite Rules. Please open a PR if/when you do - it would be great to have better WPML support.

-

Since we are not familiar with this plugin, I can not find any reports from our side, nor we are sure how the plugin handles URLs, I would like suggest that you invite the plugin author to our program where our developers will be glad to help in this process and making their plugin WPML compatible:

- https://wpml.org/documentation/support/go-global-program/

I think this is the best and quickest way since otherwise, it would take us some time, to deploy, replicate, debug and try to find a workaround, which might, in the end, would still need us to contact the plugin author.

Please let me know if you agree, and try to contact the plugin author and share this link, our devs will be glad to help out 🙂

Kind regards,
Drazen

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.