Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client needed assistance with translating two custom menu items that were not automatically translated on their multilingual website.
Solution:
We advised the client that WordPress automatically displays an array of pages in the menu if no menu is set, even without WPML. To resolve the issue, the client should create a translated version of their menu. Once a menu in another language exists, they can manually add a translated label or custom item in the second language. We also reminded the client to refer to the documentation: https://wpml.org/documentation/getting-started-guide/translating-menus/#option-2-translating-menus-manually

Please note that this solution might not apply to your situation if it's outdated or not relevant to your case. We highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket with us.

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.

This topic contains 5 replies, has 2 voices.

Last updated by Dražen Duvnjak 6 months, 3 weeks ago.

Assisted by: Dražen Duvnjak.

Author Posts
April 30, 2024 at 6:04 am #15579267

Ton

Hello Drazen,

I fiddled around with the database and reverted the weird translations for my site.
This showed more content already.

Than I updated the pages, with no real content changes, this fixed it even more.

After a few changes in my theme, I managed to get it 99% working.
There is 1 more thing I need to fix.

I have 2 custom menu-items in my menu.
These somehow are not translated, could you assist me with this?

Kind regards

April 30, 2024 at 6:05 am #15579271

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

can you please explain how did you add those custom menu items and how are you translating them?

If you have created them via Apperenace > Menu, you can click on the pencil for your 2nd language and adjust your menu how you wish.

- https://wpml.org/documentation/getting-started-guide/translating-menus/#option-2-translating-menus-manually

Regards,
Drazen

April 30, 2024 at 8:34 am #15579953

Ton

Hello Drazen,

I did not yet ACTIVELY translated my menu's. So there are no menu's in the other language.
Now i have added 1 menu-item via the normal WordPress menu items way. So adding a "custom" menu item in my original, where you can enter your own URL and label.

So the menu's are now somehow linked I guess, because everything is translated, because the pages are translated. All but these custom items.

You have enough info this way?

Kind regards

April 30, 2024 at 8:41 am #15579966

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

yes, this is done automatically by WP, even if you do not have WPML and not any menu, you will see WP will display some array of pages in your menu.

So, for this to work correctly you need to create a translated version of your menu, and a menu in another language needs to exist. In that case, you can manually add a translated label/custom item in 2nd language.

Documentation was shared in my last reply.

Regards,
Drazen

April 30, 2024 at 8:43 am #15579973

Ton

I now synched the menu's.
There was an error (the URL say "Array"). By removing them and re-adding them the menu is now completely fixed too. Weird though it said "Array".

April 30, 2024 at 9:23 am #15580497

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

great, glad to hear that.

If needed you can always manually edit the translated menu.

Kind regards,
Drazen