Skip Navigation

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 15 replies, has 2 voices.

Last updated by collinC 1 year, 5 months ago.

Assisted by: Andreas W..

Author Posts
September 28, 2022 at 5:39 pm #12143269

collinC

Hello, I am having and issue with WPML and the Mega Menu plugin. I want to set the primary navigation as and English version of the navigation for both English and Spanish. Under Appearance > Menu, it looks like I have English menu options defined for both languages (hidden link and hidden link). The main menu shows up as expected on the English side but on the Spanish side, I just see an unformatted list of the site's pages.

I've checked the cache and I don't see any other obvious conflicts that might cause this. Is there a specific setting I need to check to make the English menu show up on both languages?

September 30, 2022 at 4:28 pm #12158451

collinC

Hello, I wanted to give you an update on some of the troubleshooting steps that I have taken so far. First, I changed my theme to Twenty Twenty Two and disabled all plugins except the Mega Menu and WPML ones and the menu didn't change. Then I disabled Mega Menu and again no change was made to the main menu. The English version only showed on the English side and not on the Spanish side.

I do have a log in and password set up for you to use if needed. Please let me know if there are any other things I can try in the meantime.

Thank you.

October 1, 2022 at 5:50 pm #12161641

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I am not sure if I understand that right:

" I want to set the primary navigation as and English version of the navigation for both English and Spanish."

Would you like to use the same menu from EN also on ES or would you like to translate the menu?

At the moment your menu is translated, which means the ES version will only show menu items of content that is already translated.

Further, when it comes to Max Mega Menu make sure to enable the option:

WPML > Languages > Adjust IDs for multilingual functionality” and follow this documentation:
hidden link

If you still run into unexpected issues after that please let me know but make sure to also first test with the latest version of our plugins, as they seem currently to be outdated.

Guide:
https://wpml.org/faq/install-wpml/

Best regards
Andreas

October 1, 2022 at 7:44 pm #12161885

collinC

Yes, that's correct. I want to show the same English language menu in the same menu location on both the English and Spanish translations. As you can see from the screenshots, when the language is set for both English and Spanish, you can see the menu entries are in English.

I did check that setting and Adjust IDs for multilingual functionality and it's already set. It looks like the settings from that page are the ones I have.

I've also updated the WPML CMS plugin to the latest version on my test site and it doesn't seem to make a difference. I'll get the one on the live site updated shortly as well.

Please let me know if there are any other steps I need to take.

Thanks,

Collin

October 2, 2022 at 2:08 am #12162359

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello Collin,

Ok, I hope I get this right now, as with the same menu I referred to the content, not the layout.

If you translate a menu in WordPress with WPML, for example from EN to ES, then inside the ES menu you will only be able to select dynamical content like pages, posts, and taxonomies that are translated to ES.

You will not be able to display the identical EN menu on ES, unless you use custom menu items and translate them with WPML String Translation, or simply edit the translated menu manually.

In case I got this wrong I ask for apologies, but I am mentioning this as I had already clients that wanted to display the original menu in the site's default language in all languages.

Now, after having a look on your site, I see the menu is actually translated, so we see Spanish content on the Spanish menu, which is expected.

The only thing that is not matching is the menu layout.

So, I would suggest you go to Appearance > Menus and switch the admin language to ES, then edit the menu.
You should find here Mega Maex Menu Options and they are probably not set on the ES menu.

If you adjust those settings manually, the layout issue should be solved.

Further, you could also first check WPML > Settings > Custom Field Translation and look for custom fields that refer to these Mega Menu Options, then set those fields to "copy".

Maybe this could solve the issue with missing settings on translated menus at the moment that you translate the menu, as with the correct settings these options should be copied when the menu gets translated.

Guide:
https://wpml.org/documentation/getting-started-guide/translating-custom-fields/

If you still need assistance here, please let me know, and I can offer to have a look at the site as an admin user for which I will enable a private reply form, if still necessary.

Best regards
Andreas

October 3, 2022 at 8:02 pm #12172829

collinC

I think I see what you're saying. I can probably go in and update the menu but I'd need to update some CSS to get the same formattings.

The strange thing about this is we have been showing the correct menu for the past couple of years. We haven't made any changes to the menu area settings that would account for this change. Similarly there hasn't been any recent Mega Menu changes

Has there been some sort of change to the way WPML has worked that might have affected the menu? Creating a big new menu and swapping out the CSS will take a ton more time than if we just need to toggle a switch somewhere.

Thanks,

Collin

October 4, 2022 at 4:01 pm #12179319

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello Collin,

There could be many reasons for the issue, which could even be related to a third plugin.

I would suggest you first make sure to install the latest version of our plugins at Plugins > Install > Commercial.

Guide:
https://wpml.org/faq/install-wpml/

After that try fixing the menu by using WPML > WP Menus Sync.

I hope this can solve the issue - if not, please let me know, but there might not be another way around to fix this and you will need to recreate the menus by following this documentation:

hidden link

In case translating the menus will not work as expected, or maybe WPML > WP Menus Sync is what breaks the menu, then let me know.

Best regards
Andreas

October 5, 2022 at 6:09 pm #12188071

collinC

I've got a staging site that I'm working on that has the latest version of WPML. I've asked my client to update it on their site as well so that shouldn't be an issue.

I've gone to WPML > WP Menu Sync and I see some of the pages that look like they have Spanish equivalents. I can see the Spanish titles of some of the pages, however I can't change the title from Spanish to English on this page.

Most of the pages don't have a Spanish translation. I see a "Not translated" message besides most of the pages. If the Spanish version isn't available, we need to have a link to the English page until a Spanish translation is made available.

One other weird thing I noticed is if I add another page to the menu and save it, it removes all of the other pages from the menu. The only thing that remains are custom links. I'm not sure what that means but it's an unexpected behavior.

Pleas let me know if I can provide any more details.

Thanks,

Collin

There also

October 5, 2022 at 6:16 pm #12188081

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

As I mentioned earlier, when translating menus with WPML you will not be able to show EN content on the ES menu. (unless you use custom links)

This means, if you add the EN Homepage to the EN menu then WPML will dynamically link to the ES homepage once a translation for this page exists. WPML will not link dynamically to EN content on the ES menu.

Please read this documentation and let me know if you have further questions:
https://wpml.org/documentation/getting-started-guide/translating-menus/

For unexpected behavior when editing a menu:

According to the provided debug information the site runs on a WP Memory Limit of only 40M.

Could you please increase your Memory Limit and WP Memory limit to 256M? 128M is the minimum required by WPML.
Your current values are:

PHP MemoryLimit 512M
WP Memory Limit 40M
Add this code to your wp-config.php to increase WP memory:

define('WP_MEMORY_LIMIT', '256M');

Paste it just before:

/ That's all, stop editing! Happy blogging. /

These settings can be limited directly by your hosting provider, so I recommend you to contact and ask them to modify them directly.
If you can get even higher values It would be great.

https://wpml.org/home/minimum-requirements/
Note: WPML needs a minimum WP Memory limit of 128M to work only under a minimal environment, it means, with a default theme and not other plugins installed.

Best regards
Andreas

October 5, 2022 at 10:05 pm #12188985

collinC

OK, we'll check those server settings and see if that helps.

Did the feature to show English menu items on both the English and Spanish side get removed at some time? I looked at the changelogs and didn't see anything that mentioned that. If you look at archived versions of the English (hidden link) and Spanish version (hidden link) from September 1 of this year, you can see the English menu on both versions. Again, we haven't made any changes to the site that should have caused this.

Is there a way to manually set the menu in the theme file? There is a wp_nav_menu call in the theme's header.php file. Can that be used to force the English version to load? We only have one language that we'll ever need for this site.

Thanks,

Collin

October 6, 2022 at 2:26 am #12189681

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello Collin,

If you do not translate the menu, then you should be able to achieve this behavior.

This means you would need to delete the currently existing translation of the menu.

Best regards
Andreas

October 6, 2022 at 1:47 pm #12194471

collinC

I don't think we've ever defined a Spanish menu under Appearance > Menu (hidden link). There doesn't appear to be another menu that matches the Spanish version of the main menu either. Is there another place that WPML might be checking for that menu that I can edit?

Thanks,

Collin

October 6, 2022 at 10:14 pm #12197367

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Yes, I remember that in the past when not translating a menu the same original menu showed up - I believe someday this was also set to not show a menu in a second language if a menu does not exist.

Indeed, I did a test on a sandbox today and it appears that what you experience on your site is to be expected - as soon there are translations created with WPML we are already setting those automatically on the translated menu, even if the menu is not translated.

hidden link

On this site, there is a translated page and a translated post as menu items, and they are inside a menu that only exists in EN (no translated menu). Also, there is a third page that is not translated and this is why it does not show up on DE.

Take note, if you would like to show the same menu in all languages then this is for many users' unexpected behavior and this might be why our devs designed WPML now this way.

In order to achieve what you are expecting you will need to create an ES menu with custom menu items.

There is not any way to display EN content on ES pages dynamically, as this is not how WordPress is supposed to work.

Further, if WPML would make this somehow possible, users would get redirected to English when using the menu in Spanish, which would be unexpected behavior and might be another reason why our devs made this change to WPML.

Best regards
Andreas

October 10, 2022 at 2:47 pm #12214539

collinC

Let me check with my client to see what they want to do for this. Can you keep this ticket open for a little while longer while we see what we need to do to create a new menu?

Thanks,

Collin

October 11, 2022 at 8:56 pm #12223245

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello Collin,

Sure, this ticket will remain open for a maximum of 14 days and close automatically if we will not receive any further reply at this time.

Please explain to your client the following:

Max Mega Menu is not inside the list of recommended plugins for WPML, which does not mean that it will not work with WPML, it means that we did not fully test it yet:

https://wpml.org/plugin/?wpv_view_count=120064&wpv-plugin-functionality=0&wpv_post_search=Menu&wpv-wpcf-recommendation-flag=&wpv_filter_submit=Search

When translating content created with Max Mega Menu please follow their documentation:
hidden link

Generally, there is no longer a need to translate menus with WPML; unless you use Custom Menu items or Plugins like Max Mega Menu.

Usually, if you now delete the translated menu, then WPML will automatically show the menu in the second language with all menu items, that do relate to content that already has been translated. (except custom menu items)

Further, if you use plugins that add options to the menu (Max Mega Menu), then you might in fact need to translate the menu as they explain in their documentation.

The reason is, that the options for this menu will need to be set for each language and even could be set independently different for each language.

Now, you might be able to use WP Menus Sync for the content but this will possibly not work for menu options from additional plugins. As far I remember the only plugin of that kind that supports such a feature is Ubermenu 3:
hidden link

So, you will need to translate custom menu items with String Translation and menu options need to be set on each menu manually, but if you wish I also can provide a test site on which you can install MaxMega Menu PRO in its latest version, and we do some testing if you wish?

Best regards
Andreas

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.