[Resolved] WP Menu Sync not picking up translated Custom Link Label
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing issues with WP Menu Sync not picking up changes made through String Translation for custom link labels pointing to external sites. Solution: We recommended following a specific workaround detailed in our errata page for issues related to the translation of custom menu items. Here are the steps we advised: 1. Go to WPML > String Translation and delete the string registered under the Menu domain. 2. Navigate to Appearance > Menus and save the menu without making any changes to allow the menu strings to re-register for translation. 3. Return to WPML > String Translation and translate the custom menu link and label. 4. Access WPML > WP Menu Sync and perform the synchronization. Even if the English name appears initially, proceed with the synchronization. 5. After synchronization, clear the cache from WP Rocket. 6. The WP Menu Sync page will reload, displaying the translated custom menu link and label. Synchronize the menu again to update the menu label with the correct translation.
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 further assistance is needed, 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'm trying to use String Translation as per the documentation to update a custom link in the default (english) for all the languages.
I ran the WP Menu Sync, then ran the String Translation, then went to run the WP Menu Sync again, but none of the translated strings/menu labels where shown to have been updated ready for sync.
Symptoms:
When running the WP Menu Sync after String Translation, it hasn't picked up any changes to be synced as per the screenshots.
Questions:
Why is WP Menu Sync not picking up translated Custom Link Label?
How can I ensure that changes made in String Translation are reflected in WP Menu Sync?
Hello There!
Thanks for reaching out to WPML Support.
I understand the issue you're experiencing. With custom links in the menu, there is a known issue where the menu labels don’t appear translated after using WPML's "WP Menu Sync" feature to create the translated menu. Please refer to the errata below for more details.
Please apply the workaround mentioned in the errata, as it should help resolve the issue. Our development team is actively working on a fix, and we expect the issue to be resolved in an upcoming version of WPML. In the meantime, please continue using the workaround.
Let me know the update. I'll be happy to help if you need further assistance in this matter.
The link in the menu item may point to an external site, but the issue here is with the menu label. The workaround mentioned in the Errata should address this. Since you've mentioned that the menu label isn't showing as translated, even though you've correctly translated it via String Translation, this issue seems similar to the one outlined in the Errata.
Please give the suggested workaround a proper try and let me know how it goes. If you need any further assistance, I’ll be happy to help.
My apologies, but maybe I'm missing something in the process.
The Process:
I went to WPML > String Translation, then scrolled down the page and checked the box labelled "Look for strings while pages are rendered", see screenshot.
Plus, I also clicked the "Edit" button to verify that the "Primary Menu" item was checked
for "Auto-register strings from these text domains". As per screenshot.
Then as per instructions, I went to WPML > WP Menu Sync
The current label remains essentially the same with @ ID where id is the language name.
I scrolled down the page and before clicking anything, I read the message as I have done previously.
On-Screen Message
Your menu includes custom items, which you need to translate using WPML's String Translation.
1. Translate these strings: Primary Menu, Mobile Menu, Footer Menu
2. When you're done translating, return here and run the menu synchronization again. This will use the strings that you translated to update the menus.
I clicked the link for "Primary Menu", which has taken me to the string translation screen. The label was shown on screen, but as per previous attempts it was already translated, as you can see from the screenshot.
Then as per the instructions, I went to WPML > WP Menu Sync. The labels didn't update as expected. As per screenshot
Plus, the number at the bottom of each still reads as zero (0)
When I click the Sync button, I'm taken to a screen where you would select which items to sync.
However, all the labels appears exactly as they did in the previous screen, as per the screenshot.
Hopefully, this may help you identify where the issue resides.
Hello There!
Thank you for sharing the detailed update!
It seems you've followed the steps correctly, but since the issue persists, a closer inspection is needed to identify the root cause.
I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.
You will find the needed fields below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.
IMPORTANT
-Please backup site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link
I’ve checked and successfully synchronized the menu, ensuring the correct translation for the custom link. You can view the result here: hidden link.
Here are the steps I followed to display the correct translation in WP Menu Sync:
1. Went to "WPML > String Translation" and deleted the string registered under the Menu domain.
2. Navigated to "Appearance > Menus" and saved the menu without making any changes, allowing the menu strings to re-register for translation.
3. Returned to "WPML > String Translation" and translated the custom menu link and label.
4. Accessed "WPML > WP Menu Sync" and performed the synchronization. Although the English name initially appeared, I proceeded with the synchronization.
5. After synchronization, I cleared the cache from WP Rocket.
6. The WP Menu Sync page reloaded, displaying the translated custom menu link and label. I then synchronized the menu again, which updated the menu label with the correct translation.
Let me know if everything appears as expected on your end! If you need further assistance in this matter, feel free to let me know. I'll be happy to help.