1

I'm implementing CiviCRM + Wordpress + WPML for multiple languages on frontend pages. WPML provides the option of switching languages in two ways: via a URL parameter or a path parameter. For example:

I'm finding that in either of the URLs where the language is designated, it breaks all css/js resource links on the page. For example:

I have no idea why the use of the parameter converts the css reference into the non-pretty links version, or why it prepends the language parameter to the beginning of the URL (which is why it breaks things).

Anyway -- I'm wondering if anyone has run into this and has suggestions for using WPML with Civi. I'm pretty stumped.

I should note -- either language-switch option does result in the Civi page being translated as expected. It just completely breaks the site design because all css/js links fail to load.

3

1 Answer 1

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.