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

Last updated by Andreas W. 3 months, 4 weeks ago.

Assigned support staff: Andreas W..

Author Posts
June 5, 2019 at 12:14 pm #3960301

szymonG-3

Hi there, 

Since we’ve translated only a few pages into the secondary language (Spanish), we’ve decided to use the same menu for both default (English) and secondary languages,

We’ve just changed the labels for the items we’ve translated. (Pricing —> Precios, i.e.)

But once we switch the language into Spanish the order of menu items changes.

Here’s the screenshot of menu for default language. Pricing is on the third position

And here is one we get for the pages in Spanish. Precios (Pricing) goes on the second position.

What we expect:

The same order of menu items for both versions.

Thanks in advance

June 6, 2019 at 2:28 am #3965061

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hello,

Thank you for contacting the WPML Support Forum.

Could you please verifz the menu structure at Appearance -> Menus. Click the pencil icon to the right order to edit the menu in second language. Menus will need to be ordered here.

More information here:
https://wpml.org/documentation/getting-started-guide/translating-menus/

Also please verifiy if it is possible to sync the menu at WPML -> WP Menus Sync.

Let me know if this solved the issue.

Kind regards
Andreas

June 6, 2019 at 6:12 am #3965971

szymonG-3

Hi Andreas,

Thanks for the assistance, but you might have misunderstood me.

We haven’t translated menu into Spanish, so we can’t edit the order in the second language. The reason is that we want to show all the menu items for both languages, even if they are not translated yet. Nevertheless, we want to show the labels in Spanish if the page is already translated. We just want to create a some kind of mix.

If translated item exists —> show the label in Spanish
If translation doesn’t exist —> show the label in the default language (English)

We don’t want to hide the menu items where there is no translation.

How can we achieve this without reordering the menu items when switching to Spanish?

June 6, 2019 at 5:40 pm #3971239

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hello,

Using WPML a menu can only be displayed on the second language if it was translated at Appearance -> Menu. You will need to add and order menu items from here.

The available menu items here will be based on the status of your pages´s translations, which means that only such second language items will be available if there are already translated. Otherwise, you can switch the language at "Add menu items" and add English menu items manually.

In order to make sure that the new create menu for the second language stazs independent, make sure to leave the option "Translation of" to "none". (See screenshot)

I hope this answered your question.

Kind regards
Andreas

June 7, 2019 at 6:41 am #3974227

szymonG-3

ok,

Let's assume that we decide to create an independent menus in Spanish (but to show there both items in Spanish and English)

As you see on the screenshot there're only several positions we can add there, and all of them are in Spanish. Does it mean that we should manually add "translated" versions for all the pages we want to add to menu, but for those that are not translated yet simply add page template with English translation?

Thanks for assistance. It seems to be the last thing we wanted to clarify

June 7, 2019 at 3:34 pm #3977445

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hello,

Thank you for your message.

In order to create an independtend Spanish menu, including Spanish and English menu items, simply change the language at "Add menu items" (See screenshot).

I hope this answered your question.

Kind regards
Andreas

June 10, 2019 at 7:32 am #3985603

szymonG-3

Thanks Andreas,

but it doesn't work that way for us

I've added a gif, so you can see that once I click "English" in the Add menu items tab, I'm redirected to the Primary English menu and can add English menu items only there, but not to the Spanish menu

What I'm doing wrong?

June 10, 2019 at 5:32 pm #3989223

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hello,

I am sorry, I was not aware of this issue, but what your gif indicates is WPML default behavior.

The workaround here would be to duplicate the pages. I mean, if you wish to add a Spanish site to the English menu, it might get solved by duplicating the Spanish site and assigning it as English content.

I can advise you the following plugin for duplicating the pages:
https://wordpress.org/plugins/duplicate-post/

Afterwards open the page editor and set the language options in the right sidebar for "Language of this page".

The page should now be available as menu it.

Let me know if this solved the issue.

Further, you might try to ask for a feature request here. I am sadly not able not guarantee if such feature is able to be implemented, but I would advise to submit a request anyways:

https://wpml.org/suggest-a-new-feature-for-wpml/

Kind regards
Andreas

June 18, 2019 at 11:06 am #4043009

szymonG-3

Hi Andreas,

I want to follow-up on that case.

The workaround you've proposed requires to duplicate almost all of our content, which will not be a SEO friendly move. Above that our URL would look line domain.com/es/tour and it still would be in English, so users might get confused.

What we want to have is fully English site with only a few sites translated to Spanish. At this moment it would be only home page and pricing page. We were able to accomplish that with different plugins and I believe this is not an unusual request. Is there really no other way?

Looking forward to your reply.

Best Regards,
Szymon

June 18, 2019 at 5:59 pm #4045683

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hello,

As mentioned the menu behavior is default behavior for WPML. A menu is created in default language and then translated into the second language. A different behavior might cuase redirection issues but I would like to invite you to send a feature request in order for our developers to revise the issue.

I am not aware about any WPML compatible plugins that could solve your menu items issue but you can find more information about plugins that have been tested with WPML here:
https://wpml.org/documentation/plugins-compatibility/

Such custom works are not covered by our support policy. I would advise you to reach out to a contractor:
https://wpml.org/contractors/
https://wpml.org/purchase/support-policy/

Now, for my workaround, it is not necessary to duplicate all the pages. The language switcher option will only show up for pages, posts or products that do have a translation.

You said:
"What we want to have is fully English site with only a few sites translated to Spanish. At this moment it would be only home page and pricing page. "

In order to achieve this with WPML run WPML in default lanuage English and only translate the Homepgae and the pricing page.

At WPML -> Settings -> Post Type translation you are also able to det the option "translatable or fallback to default language" for pages, posts and product, etc. This waz, if you use for example a Post Page or a Product Lisiting page, it will not be mandatory to translate all the posts or products, as the fallback option will make sure that the items will be displayed in default language, if a translation odes not exist.

https://wpml.org/2009/11/language-fallback-for-blog-posts/

I hope this answered your question.

Kind regards
Andreas