Is OMGF (Pro) compatible with WPML/Polylang?

Last updated on 2022-08-10 19:59:43

Yes! OMGF v5.0.0 and OMGF Pro v3.3.0 are compatible with WPML. There are a few sidenotes though.

Using subdirectories

If each language is served through subdirectories, the structure of your website looks like this:

  • yourdomain.com
  • yourdomain.com/de
  • yourdomain.com/nl
  • yourdomain.com/fr
  • yourdomain.com/es
  • etc.

If you've configured your multilanguage plugin to use subdirectories, no additional configuration is required. OMGF (Pro) will load the proper stlyesheets out of the box!

Using (sub-)domains

If each language uses its own (sub-)domain, the structure of your website looks like this:

Subdomains Domains
  • yourdomain.com
  • de.yourdomain.com
  • fr.yourdomain.com
  • es.yourdomain.com
  • nl.yourdomain.com
  • etc.
  • yourdomain.com
  • jouwdomein.nl
  • deinedomain.de
  • tondomaine.fr
  • etc.

Using this configuration, your server might run into Cross Origin Resource Sharing (CORS) related issues. You know your server has CORS related issues, if the Google Fonts are properly loaded on the main domain (e.g. yourdomain.com) but other domains are displaying system fonts.

If this is the case, you should configure the main domain (yourdomain.com in this example) to accept requests from your other domains.

Apache

In Apache, this means adding the following rule for each separate language domain (not the main domain):

Header set Access-Control-Allow-Origin "https://deinedomain.de"<br>

Or, when each language is served through subdomains:

Header set Access-Control-Allow-Origin "https://de.yourdomain.com"<br>

Nginx

When using Nginx, each language should be added by adding the following rule in the server block nginx.conf or in-use configuration files:

add_header Access-Control-Allow-Origin "https://deinedomain.de";

Or, when each language is served through subdomains:

add_header Access-Control-Allow-Origin "https://de.yourdomain.com";

Shopping Cart
  • Your cart is empty.