Yes! As of v5.0.0 and v3.3.0 respectively, OMGF and OMGF Pro v3.3.0 are compatible with WPML. There are a few sidenotes though.
As of v3.10.0, OMGF Pro automatically configures itself to ensure compatibility when WPML is active. The below only counts for earlier versions.
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 |
|
|
Using this configuration, your server might run into Cross Origin Resource Sharing (CORS) related issues once Google Fonts are stored on and served from your server. 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 need to configure OMGF to use domain relative URLs using the Modify Source URL (Pro) option.
Since Modify Source URL (Pro) is a Pro-feature, an upgrade to OMGF Pro is required.
Configure OMGF Pro to use Domain Relative URLs
Navigate to OMGF Pro's Advanced Settings tab.
The default path where OMGF stores its fonts and stylesheets is wp-content/uploads/omgf
(relative to your WordPress installation directory.)
To make OMGF Pro use Domain Relative URLs you would enter the following value in the Modify Source URL (Pro) text field:
/wp-content/uploads/omgf
If you changed this directory using the omgf_upload_dir
and omgf_upload_url
filters, you'd have to modify the above to reflect your changes.
After saving your changes, head back to the Local Fonts tab and hit Save & Optimize, or Refresh Cache depending on your wishes.