WPML/multilang support ?
-
Hi
Thank you for this awesome plugin, I wish I saw it weeks ago when I started working on PWAing my site! ^^A question though. My site uses WPML for multilingual features and as 5 languages, which can be accessed on http://www.mysite.com/en/, http://www.mysite.com/fr/, http://www.mysite.com/it/, etc.
When I generate the manifest.json through your plugin, it was generated on http://www.mysite.com/en/superpwa-manifest.json, but I can see that the same .json is also on /fr/superpwa-manifest.json, /it/superpwa-manifest.json, etc.This causes 2 issues:
1. Every manifest.json have the same start_url, which currently is /en/
This is because in your plugin settings, you must choose an existing page, but because of the way WPML deals with posts, I am forced to choose a page whose URL starts with /en/ (since my admin was on the /en/ side).
I suppose that you could allow the user of your plugin to choose either an existing page OR type a custom URL, which would have allowed me to set / (>> http://www.mysite.com/ which then redirects to /en/ or /fr/ or… depending on the browser language).2. I am not sure why, but the “Add to Home screen” option only appears when I visit /en/.
Maybe this is because of the start_url being /en/ while the scope is /fr/ (example on /fr/manifest.json)
The /fr/superpwa-sw.js also has
const startPage = ‘https://www.mysite.com/en/’;
const offlinePage = ‘https://www.mysite.com/fr/’;
Not sure if it helps.WPML being widely used, maybe you’ll want to investigate these issues.
I’ll be glad to help in any way I can.
Thanks
The topic ‘WPML/multilang support ?’ is closed to new replies.