-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gatsby-source-wordpress] switching languages using WPML #3263
[gatsby-source-wordpress] switching languages using WPML #3263
Comments
I'm using Polylang but conceptually this aproach will work with any multi language plugin:
and then in |
Thank you so much for helping out, I'll try if this works with WPML. |
Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help! |
@stefan-meier did you get this working by any chance? |
Unfortunately, Polylang does expose more information into It is possible to switch the language by appending a query param like I filed a PR that should fix this by allowing to add custom routes at build time. There are more issues like this linked, with more details. |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m Thanks again for being part of the Gatsby community! |
Hi @pieh, I'm trying to implement switching languages using Polylang but I can't find documentation about it. Maybe you could share an example of how you implemented it? |
I'm in the process of converting a multi-language WordPress website using WPML to Gatsby.
Unfortunately I'm not quite sure how to get Gatsby to create pages for every post/page/custom post type in all defined languages automatically and how to set a connection between the languages (e.g. when I'm on a specific page and change the language, display that page in the selected language).
I already installed the WPML-REST-API WP-Plugin which lists the existing translations for each post including their ID but I’m just not sure how and if those IDs can be processed by Gatsby automatically.
Is it necessary to adjust the gatsby-source-wordpress plugin in order to achieve this and if yes, which part would I need to change? I’m thinking of extending the plugin using a config-flag like
useWpmlRestApi
or something like that.I'm using react-i18next for translating non-WP content and switching languages if that helps.
The text was updated successfully, but these errors were encountered: