-
Notifications
You must be signed in to change notification settings - Fork 178
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
Translate Web Stories using WPML #13446
Comments
Hello Pascal, thanks for the feedback! We did some tests to see how Web Stories plugin uses the post_content_filtered column. If it just copied the value from post_content, it would be easy to fix this by just duplicating the value after translation. However, we found that it have a JSON content, and that it is generated before the content from post_content. So this would require a bit more complex integration. About the issue you mentioned with the translation editors, we usually not recommend to mix translation modes in the same post: https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/#when-to-use-manual-translation For example, let me describe a common scenario for page builder plugins:
Therefore, our official recommendation is not to mix different editors for the same post. I believe this would also apply to the Web Stories plugin. So, if we continue with the original idea (wrap post_content in a Gutenberg block), the recommended workflow would be:
We can cover both scenarios in a documentation on how to use the plugin with WPML. After that, we can monitor how users are using the plugin, and if needed, we can work on better integration based on user feedback. What do you think? Can we continue with the original approach? |
That makes sense to me. Just noting that (1) might not be possible very often, because translations can be shorter and longer. So I assume Web Stories users are more likely to do (2).
Can you elaborate on that? Does that mean you will be adding the Gutenberg block wrapper and XML config etc. in WPML? Just to clarify that this is not something that you expect us to add in the Web Stories plugin. |
We think it's safer if you could implement the Gutenberg wrapper in the Web Stories plugin. It would be possible? With that in place, we can generate an XML configuration and then add it to our remote repository: https://github.com/OnTheGoSystems/wpml-config This should be enough as the remote config should load automatically when activating WPML. If you have any dummy/test content for the Web Stories plugin it would be also very useful. We will need some examples of how it is used to generate a XML configuration that covers most uset needs. |
I will need to think about it. I worry that adding this wrapper causes backward compatibility issues
If you install the Web Stories plugin and go to Stories -> Explore Templates, there's 59 unique templates that should cover everything. You can easily create a new story from any template. |
Ok, thanks! We will wait.
Great! This will be very helpful. |
Feature Description
Hi there, this is Diego from the WPML Compatibility team.
We did some testing with the plugin and found that we can add translation support with WPML if the post_content value were wrapped in a gutenberg block.
For instance, instead of having just the HTML content inside post_content:
We could have something like:
With this, we could use our language configuration file to find the strings using XPATH and then register and translate these strings: https://wpml.org/documentation/support/language-configuration-files/#gutenberg-blocks
Here is a quick example for the XML file:
This worked correctly as we can see here:
Would it be possible to implement this?
The text was updated successfully, but these errors were encountered: