Background of the issue:
I am redesigning a website that will be 99% English, with a single page for each of the languages in the menu switcher. I want the English menu to display in its entirety for all languages without manually creating the menu in each language, as this would require updating 10+ menus every time a page is added to the English menu.
Symptoms:
I found a few older tickets but they were confusing and hard to follow.
Questions:
How can I display the English menu for all languages without manually creating it in each language?
I tested the solution in a testing environment, and it worked like a charm. Note the in the first line of the code, you have to insert the menu location:
$locations_to_omit = ['header']; //Append menu locations here. e.g. ['primary', 'footer']
Based on what you shared, I put the location 'header'. Please check carefully the location of the menu you inserted, to see if it matches the variable that must be inserted there. It's the only part of the code that can/must be changed.
Make sure to have a full website backup and that this code is inserted at the end of your active theme's functions.php file.
I'm getting a second opinion with my colleagues. Unfortunately, this solution is outside the scope of our support. The correct way to proceed here would be to create a feature request. We cannot create custom code for customers. I sent you the code because I found it in an old internal ticket and thought it might be useful. If it's not working, you must correct it yourself, or ask us for the feature request I mentioned.
I'll see what's possible and will get back to you, ok?
I talked to my other colleagues and in this situation we can only offer the two options:
1. Duplicate the menus manually. To do that go to Appearance > Menus, click on the "+" sign to add menus in secondary languages, and insert the EN links and labels.
2. Via code. To do that, you can try editing the code we sent, so it works in your context, or check our professional contractors service, here: https://wpml.org/contractors/
I apologize for not being able to find a quick solution. Since a workaround involves custom code and is not part of the set of features, we cannot help further. I'll check if we have some ongoing feature request, to add this ticket as reference.