Skip Navigation

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.

Tagged: 

This topic contains 7 replies, has 2 voices.

Last updated by Prosenjit Barman 1 month, 1 week ago.

Assisted by: Prosenjit Barman.

Author Posts
October 23, 2024 at 1:32 am #16319680

paulW-64

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?

October 23, 2024 at 7:57 am #16320396

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

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.

- https://wpml.org/errata/wp-menu-sync-translation-of-custom-menu-items/

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.

Best regards,
Prosenjit

October 23, 2024 at 9:56 am #16321153

paulW-64

Hey,
I don't think that this solution would work, as the custom link menu item that I'm trying to get translated points to an external site.

Please advise best approach to resolve?

October 24, 2024 at 4:05 am #16324127

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There!
Thank you for the update!

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.

Best regards,
Prosenjit

October 24, 2024 at 5:00 am #16324159

paulW-64

Firstly, I appreciate your assistance.

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.

errata-attempt1-wpmenusync-second-step.png
errata-attempt1-wpmenusync.png
errata-attempt1-stringtranslation-auto-register.png
errata-attempt1-stringtranslation.png
October 25, 2024 at 12:36 am #16328637

paulW-64

Hey,

Please note that I even, created a new menu with only custom links. Ran the same process as per the above and errata, and the same result occurred.

The string translations are present before running the WP Menu Sync and they are still not being linked/recognised by the WP Menu Sync process.

I hope this additional process assist with this debug process.

October 25, 2024 at 3:06 am #16328888

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

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

Looking forward to your response.

Best Regards,
Prosenjit

October 25, 2024 at 4:27 am #16328959

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi!

Thank you for sharing the access details.

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.

Best regards,
Prosenjit

October 25, 2024 at 5:24 am #16329020

paulW-64

I had tried this with WP Rocket previously disabled and the same was happening.

HOWEVER, the item which I think is the takeaway from this process and hopefully it will help others, was that for custom links:

1. On the first load of WP Menu Sync, the label/text will show as
[Navigation Label] @ XX
Where XX is the WMPL language code.

2. You must proceed to the second step and select all those items for sync, then execute the sync process.

3. Upon reload of WP Menu Sync the screen will show those navigation labels in the translated language.

I guess my expectation of the process was that for point #1 & #2, would be that I would see the translated string value.

I think that this information on how custom link labels appear during the WP Menu Sync process needs to be added to the documentation.