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.

Our next available supporter will start replying to tickets in about 2.06 hours from now. Thank you for your understanding.

This topic contains 10 replies, has 3 voices.

Last updated by danielZ-23 1 year ago.

Assigned support staff: Lauren.

Author Posts
May 13, 2019 at 1:05 pm #3798445


Dear Support-Team,

I am using WPML with three different Domains: (Austria) (Germany) (Swiss)

I configured all WPML languages/countries like in the image attached.

I would like to set the "Default locale" for all three languages to "de_DE_formal" (not only for Germany) but I was required to enter different ones (therefore also "de_AT" and "de_CH").

I am using Woocommerce and at the frontend are many Woocommerce related strings like "Add to Cart", "Reviews" and so on.

Currently, only the (Germany) version has correct German strings in the frontend. For the other two languages the default Woocommerce/WordPress strings are in English.

How can I achieve that Woocommerce or generally WordPress loads for all three German versions the same "de_DE_formal"?

Thank you so much for your help!

May 13, 2019 at 6:44 pm #3801223


Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thank you for contacting WPML support. I'll be happy to help you with this.

You can translate the strings for your secondary language using the WPML -> String Translation. Search for the string(s) showing up in English and there you can add the correct translations.

Please let me know if you need any further assistance and I will be happy to help.

May 14, 2019 at 8:06 am #3804599


Thank you for your response, but this is not an adequate solution.
Because these translations get updated regularly it would add quite a lot extra work to maintain all those strings.

I assume the language files for "de_AT" and "de_CH" do not exist and therefore WPML does a fallback to "en_US".
Instead, the fallback to be "de_DE" or "de_DE_formal".

Would you mind sharing with me which hook and snippet of PHP-Code WPML recommends achieving this?

May 14, 2019 at 12:25 pm #3806723


Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Unfortunately I don't have a php hook or snippet to offer, and custom coding is outside the scope of our support policy.

However, do you have German set as your default language? And if so, are you loading .mo file translations? You can change this setting in WPML -> Theme and plugin localization.

Lastly, are you translating any of the content, or is all content meant to be the same for all languages?

May 14, 2019 at 1:17 pm #3807173


However, do you have German set as your default language?

Yes, in the default WordPress and WPML Language is DE and "de_DE_formal".

Now I changed the Theme and plugin localization to Translate themes and plugins using WPML's String Translation and always load .mo files as backup

Now the Woocommerce strings for the Swiss de_CH is loaded correctly.

I guess Woocommerce doesn't have a Austrian de_AT translation. But how can I make sure to load the de_DE_formal language instead of en_US by default?

Lastly, are you translating any of the content, or is all content meant to be the same for all languages?

I would like to have all theme and plugin related strings in de_DE_formal and page, product content translatable.

May 14, 2019 at 7:27 pm #3810325


Languages: English (English )

Timezone: America/New_York (GMT-04:00)

You could try copying the .mo files from de_formal and rename them with your other languages. That should load the .mo files for your respective languages. Please let me know if this resolves the issue.

May 15, 2019 at 1:02 pm #3816653


It doesn't resolve the issue because it would require to manually update the .mo files after every update.

The problem is that the Plugin requires at WPML > Languages > Site Languages > Edit Languages that Default locale is required to be unique for every language. That the language code or hreflang has to be unique is understood.

If I could give the Austrian and German Website both the same Default locale "de_DE_formal", the issue would be solved.

Maybe you could share this idea with a developer or confirm that there is no other technical way but keeping the Default local different.

May 15, 2019 at 1:47 pm #3817243


Languages: English (English )

Timezone: America/New_York (GMT-04:00)

It is required to keep the default local different for each language. In order to accomplish what you are trying to achieve would require custom programming, which unfortunately is outside of the scope of our support.

At this point I would suggest you consider contacting one of our certified partners from this link:

I'm sorry I am unable to provide an easier solution for you.

May 19, 2019 at 9:51 am #3841353


To conclude this threat: Would you share this feedback to your programmer colleagues?
To just consider the effort on lifting the "default local" requirement to be different for each WordPress language.
Thank you!

July 11, 2019 at 6:06 pm #4192477

Edward Milsom

Hi danielZ, i am trying to do something similar and I found this forum topic more useful than the above answers- hope it helps:

Especially this part about the fallback language (it may depend what your original lang is):" Is not possible to create a hreflang tag without a complete new language?"

"If the content is same then you don't need to translate them again. Select the setting "Translatable – use translation if available or fallback to the original language" in WPML -> Settings -> Post type translation. This will allow you to display the original content through different language if there is no translation for that particular language.

Related docuentation :"

Regards, EM

December 13, 2019 at 2:05 pm #5123783


I just saw you answer, Edward. Thank you for your initiative.

What solved my problem was this plugin:

It's a default WP behaviour to fallback on EN if the plugin has no translation in the specific language avaible. This plugin makes sure that I define what language will be the new default.