Skip Navigation

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

Problem:
You added a custom field "menu-title" to each menu and want to display this title above the menu with a shortcode, and you're wondering if it's possible to translate this value with string translation without translating the whole menu.
Solution:
We recommend creating the header and the custom field in the original language first. You can then translate them and use them normally. It's not mandatory to translate both the header and the custom field; if you prefer, you can create a custom field for each language separately. For more detailed guidance, please check our documentation on translating custom fields: Translating Custom Fields.

If this solution does not apply to your case, or if it seems outdated, 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. Should you need further assistance, please do not hesitate to open a new support ticket or visit our support forum 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.

This topic contains 5 replies, has 2 voices.

Last updated by Lucas Vidal de Andrade 11 months, 2 weeks ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
June 4, 2024 at 5:18 pm #15703752

davyV-3

Hi,

Okay, then I can't do anything about that.

Another question: I added a custom field "menu-title" to each menu. I want to display this title above the menu with a shortcode. Is it possible to translate this value with string translation without translating the whole menu?

Kind regards
Davy

June 4, 2024 at 7:18 pm #15704137

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

The short answer is no. The long answer is that WPML needs the Element that contains the custom-field to be translated, so WPML "knows" in which language such field should be displayed.

Let me know if you have any further questions.

June 5, 2024 at 7:18 am #15705290

davyV-3

Hi Lucas,

Okay, so I think the only option then is to create a custom field for each language then. I'll do it so.

Kind regards
Davy

June 5, 2024 at 5:37 pm #15708285

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey Davy,

If you create the header and a custom field in the original language, you can translate them and use them normally.

As I said, both the header and the custom field must be fully translated. That's not mandatory, though. If you feel more comfortable creating a custom-field for each language, you can do it this way 🙂

Here's our documentation on custom field translations, in case you want to check it out:
https://wpml.org/documentation/getting-started-guide/translating-custom-fields/

Regards,
Lucas Vidal

June 6, 2024 at 7:42 am #15709581

davyV-3

Hi Lucas,

The thing is, I don't translate the menus because now WPML translates them automatically. So Translating them is no option for me.

So the only thing I can do (I suppose) is making a custom field for each language.

Kind regards
Davy

June 6, 2024 at 1:00 pm #15711153

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi,

The header and the menu are different things. The header is the layout element that contains the menu, depending on how your website is built. There are also other ways to translate the menu, in case you want more flexibility:
https://wpml.org/documentation/getting-started-guide/translating-menus/

Regards,
Lucas Vidal