[Resolved] Translations are not be displayed on the frontend website
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing issues with translations not displaying correctly on the frontend of their website. Specifically, translations are not appearing in the intended language but are showing in the original language (German) instead. This issue arises when using patterns with H1 tags, which might not be fully supported for translation in the current setup. Solution: 1. Verify that the pattern and the page are translated separately. This approach usually resolves similar issues. 2. If the problem persists, a manual translation of the text within the patterns may be necessary until a permanent fix is developed. This involves adjusting the text directly in the default language and then re-translating it. 3. After making changes to the default language page, save the changes and then re-translate the page to ensure that the translations are applied correctly.
Please note that this solution might be outdated or not applicable to your specific case. If the issue persists, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If necessary, please open a new support ticket at WPML support forum for further assistance.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Background of the issue:
We have a staging version of this website with many changes which we would like to push live. We have translated all the content and strings but the translations are not displayed.
Symptoms:
Some of the translations are not being displayed on the frontend. For example, the Polish version of this page shows German (the original language) instead of Polish: hidden link
Questions:
Why are some translations not being displayed on the frontend?
What steps can we take to ensure that all translations are displayed correctly?
I created a minimal installation of WordPress, WPML, and all necessary WPML add-ons, and themes.
You can access the WordPress dashboard using the link below:
- hidden link
Try to replicate the issue with a simple example page / block, same as the one you have, you can also import export that page if you wish. Just make sure to install Stackable plugin.
This will help us to report the probable issue to the compatibility team and solve the possible problem faster.
the sandbox has expired, can you please create a new instance for us? do you need the whole website on our staging environment to your sandbox-instance for investigation?
Alternatively, we could also offer you a complete development environment on a separate server with access credentials, which you can use independently.
No, I do not need whole website, I just need you to add the same block on the new page, so I can confirm this block is not translatable, and then escalate this case to our compatibility team. So simple dummy page with 1-2 block / same example structure as on your page, so we can confirm it is not translatble,
I see you created a pattern and added it to the page. So I have translated the page and pattern from Translation Management, and it translated fine: hidden link
Is this the same block and issue you have on your website? If yes, please share staging site access and let me have another look.
thanks, I am checking but I am not sure if you have used or created the same pattern/block as the one you have issued on your website. It looks different, as your pattern has only title + text.
Can you please try to create the same on the sandbox website, and share the steps with me on how you do that?
Yes, I have selected a different element, but it is the same problem. The translations are not displayed here either... I have now also created the header element in the sandbox. It looks a bit different which is due to the theme, fonts etc.
My approach:
1. create pattern
2. insert pattern in Gutenberg
3. customise the text of the pattern
but translation works just fine on the test site. You are adding a pattern on the page, so you need to translate the pattern first, and then the pages.
It is a bit confusing, if you can please show me the same example on the test site, you can export / import the page if that is easier for you. That way I can confirm the same issue and see if or why it is not translating.
Please do that on the new test page so I can check and add code that we can adapt to your website and then make the block translatable.
I am trying to do the same but I do not see "block title" as on your staging site. Please note we can check the issue on test site, but I can not guarantee that will fix also issue from your website, that is why we need to you to reproduce same issue / case.
We have translated everything possible in staging, but it still doesn't work.
Of course, it looks different in the sandbox because not all plugins are installed in exactly the same way. Why do I have to rebuild everything now? Why don't you just check the problem in our staging? Now almost all plugins are deactivated in our staging, I think that was you?
I honestly don't know how I can help you right now. Copying the elements from our staging into yours seems pointless to me.
since I suspect this is a bug with the mentioned plugin, we need to be able to reproduce on the new website, to escalate it to our compatibility team.
If you agree, that the issue is reproduced on the sandbox website, I can escalate that case to our compatibility team and we can check and try to fix that?
I might be wrong that is why I am trying to confirm with you that this is the same case and block you use on your website.
I have looked at what you have created in the sandbox. Just so I understand correctly: It is not possible to translate texts in patterns, we have to create the patterns for each language separately? That would be very complicated. Because I think we have also seen and translated some of the texts in WPML, but they are not displayed in the different languages.
it is possible to translate patterns and text in it, but in your case, you are adding H1 tag in the pattern and then in page text to that pattern, I think this is what is causing the issue and might not yet be supported.
Usually, you translate the pattern and then the page and it works fine.
Can you please recheck and confirm the sandbox case so I can escalate further?
In our staging, almost all patterns are actually not correctly translatable. But I think to find the error you can go troubleshooting with the status in the sandbox. How long do you think this process will take?