Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Europe/Zagreb (GMT+02:00)

This topic contains 7 replies, has 0 voices.

Last updated by Bruno Kos 2 days, 23 hours ago.

Assisted by: Bruno Kos.

Author Posts
July 17, 2025 at 1:09 pm #17246071

hugyakA

Background of the issue:
I am using WPML on my client's website hidden link to manage events listed by the WP Event Manager plugin. The goal is to list events from one institute on the original website and additional external events on another domain. I want to manage both sites from one WordPress dashboard and duplicate events from the original site to the second site. Both sites should be in Hungarian, and I need WPML to manage this setup.

Symptoms:
I need to add the Hungarian language twice and manage content duplication between two sites using WPML.

Questions:
How can I set up WPML to add the Hungarian language twice?
How can I configure WPML to bulk copy content from the original Hungarian site to the second Hungarian site?

July 17, 2025 at 2:49 pm #17246713

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

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

Hi,

To set up WPML to manage two Hungarian-language sites on different domains and enable content duplication, follow these steps:

1. Add a custom language to represent the second Hungarian variant. Go to WPML → Languages → Edit Languages. Add a new language with:

* Name: Hungarian External or something in these lines
* Language code (for example): hu-ext (must be unique)
* Locale: hu\_HU
* Flag: same as Hungarian or custom

Refer to the documentation: http://wpml.org/documentation/getting-started-guide/language-setup/editing-wpmls-languages-table/

2. Configure WPML to use a different domain for each language. Go to WPML → Languages → Language URL format. Select "A different domain per language" and assign:

* hu to klauzalhaz.hu
* hu-ext to externaldomain.hu

Ensure both domains point to the same WordPress installation and that your server is configured to handle domain mapping.

http://wpml.org/documentation/getting-started-guide/language-setup/language-url-options/how-to-use-wpml-with-different-domains-per-language

3. To manage content duplication:

* Option A: Use WPML's fallback option to display untranslated content in the secondary language. This allows content from hu to appear under hu-ext if a translation doesn't exist.

http://wpml.org/documentation/translating-your-contents/displaying-untranslated-content-on-pages-in-secondary-languages/

* Option B: Use the wpml_admin_make_post_duplicates hook to automatically create duplicates of events when they are published. Add this code to your theme's functions.php:

This will automatically duplicate events in the hu-ext language.

http://wpml.org/wpml-hook/wpml_admin_make_post_duplicates/

Let me know if this is what you are after?

July 22, 2025 at 9:26 am #17258455

hugyakA

Hi,
I tried to add the second hungarian language during the first setup process, but I received error message:

Default locale (required)
hu_HU
The value "hu_HU" already exists

however, I edded unique code here:

Code (required)
hu-kult

Please be so kind and help me, what is worng.

Thank you.

wpml-01.PNG
July 22, 2025 at 11:51 am #17259076

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

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

The default_locale for hu_HU is already reserved by default and is stored within wp_icl_languages where you can check other values as well. These values need to be different for different languages, there is no workaround for it.

July 24, 2025 at 7:24 am #17266154

hugyakA

Hi, but it is also Hungarian language and it have to be also Hungarian in the website sourche code. What do you suggest to setup? Thank you.

July 24, 2025 at 12:50 pm #17267529

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

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

I'm afraid there's not much I can suggest in this case, as WPML doesn't allow having two identical languages. While you can use language variants (such as en-GB and en-US), you cannot have two languages with the same default locale, language code, or hreflang value. This is by design and cannot be bypassed.

July 24, 2025 at 1:36 pm #17267714

hugyakA

Hi, Okay, just suggest please some concrete solution for the filling of these fields to setup the Hungarian language twice, as you confirm this possibility in the mentioned, too early closed ticket. Thank you.

July 24, 2025 at 2:17 pm #17267954

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

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

Could you please clarify which closed ticket you're referring to?

Unfortunately, there is no solution available for this, as WPML is not designed to support that functionality — it works differently by design.

As a possible workaround, you could try creating a new language using a random default locale and hreflang value during the initial setup. After that, you can manually update the values directly in the wp_icl_languages database table.

However, please note that this approach is unsupported and may lead to unexpected issues later on. Beyond this, I'm afraid there are no other workarounds or solutions I can suggest.