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?
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
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.
* 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.
* 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.
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.
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.
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.
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.