This thread is resolved. Here is a description of the problem and solution.
Problem: The client was facing an issue where despite translating everything in string translations, the cart was not translated. Additionally, a new cart page with the URL '/cart-2/' was automatically being created and set as the default, which was happening on multiple websites using WPML. Solution: We recommended checking if the 'Auto-generate from title' option was enabled in WPML>>Settings>>Translated documents options>>Page URL settings, as WPML follows WordPress guidelines for creating post slugs. If a post slug 'cart' exists, WordPress will automatically add 'cart-2' for a new post with the same slug. For more details, refer to the documentation on translating page and post URL slugs at https://wpml.org/documentation/getting-started-guide/translating-page-slugs/#translate-page-and-post-url-slugs and https://crocoblock.com/knowledge-base/articles/how-to-create-wordpress-slugs-and-permalinks/.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, 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 the problem persists, please open a new support ticket at WPML support forum.
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:
I translated everything in string translations but it's still not translated in the cart. Checkout works ok. I enabled 'auto register strings for translations'. I scanned themes and plugins for new strings. I looked in 'Translate texts in admin screens'.
Symptoms:
Cart is not translated
Questions:
Why is the cart not translated despite translating everything in string translations? hidden link
Is there a specific step I missed in translating the cart strings?
3) Go to WPML>>Support page, click on the Troubleshooting link (blue link in the middle of the page)
4) On the Troubleshooting page, please click on the following options of the *Clean up* section. Wait for confirmation of processing after each one.
- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Fix WPML tables collation
- Assign translation status to duplicated content
- Fix terms count
- Fix post type assignment
- Cleanup and optimize string tables
- Show custom MO Files Pre-generation dialog box>>Generate .Mo files
I figured out what was wrong. My cart was not /cart but /cart-2.
I had two cart pages and when I deleted the new one all was ok.
Having said that, wpml keeps adding an additional /cart-2 page and making it a default one. This happens every few weeks and I have the same problem on multiple different websites. Is this something known to you?
Thank you for the updates. Hope you have added the secondary cart page from Pages>>All Pages. Normally WPML will not create a page or post automatically. Therefore it requires further checking.
So please share a screencast (Screen capture of the bug and you can share it via Google Drive or Dropbox) for a better understanding of the issue. The screencast will help us a lot in internal communications.
Thank you for the updates. We hope you are using WPML Advanced Translation Editor for translating the posts/pages and you have selected the *Auto-generate from title* option in WPML>>Settings>>Translated documents options>>Page URL settings.
WPML is following the WordPress guidelines for creating the post slug. So if there is a post slug *cart* that exists, WordPress will add *cart-2* as the slug for the new post with slug *cart*. Refer to the following documentation for more details.
Please share a couple of screenshots or a screencast (a screen capture of the issue and you can share it via Google Drive or Dropbox) for a better understanding of the following. It will help us a lot in internal communication.
Problem is this is happening on almost every page that uses wpml, and it's hard to keep daily track.