Skip Navigation

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

Problem:
The client changed the default locale from 'en_US' to 'en_GB' in WPML, and the translations for 'Gridbuilder ᵂᴾ' are not appearing on the English pages despite being visible in WPML > String Translation.
Solution:
We recommend regenerating the MO files to ensure WPML pulls the strings from the correct locale. Please navigate to WPML -> Support -> Troubleshooting and click the 'Show custom MO Files Pre-generation' dialog box button. Then, click the blue button to regenerate custom MO files. If this does not resolve the issue, it may be necessary to manually create and rename copies of the MO files to match the new language locale. For detailed steps, please visit https://wpml.org/errata/string-translations-are-not-displayed-when-a-language-locale-is-changed/.

If the solution provided does not apply or is outdated, or if you encounter further issues, 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 additional assistance, please do not hesitate to open a new support ticket.

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.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Mateus Getulio 7 months, 2 weeks ago.

Assisted by: Mateus Getulio.

Author Posts
June 28, 2024 at 4:57 pm #15853483

adrienR-5

Background of the issue:
I have a primary language (FR) and multiple other languages. For English, I initially set the default locale as 'en_US' but later changed it to 'en_GB'. The translations I did in WPML > String Translation for 'en_US' are not following over to 'en_GB'. For example, I translated some strings of 'Gridbuilder ᵂᴾ' which worked for my WPGB facets on English pages, but after changing the default locale, those translations are no longer appearing, even though they are still shown inside WPML > String Translation.

Symptoms:
Translations tied to 'en_US' are not appearing after changing the default locale to 'en_GB', despite being visible in WPML > String Translation.

Questions:
How can I make sure all the string translations I did for 'en_US' are ported over to 'en_GB' now that it's the correct default locale?

June 28, 2024 at 7:10 pm #15854029

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

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

Hello there,

When you change the locale of a language, it is recommendable that you regenerate the MO files so that WPML pulls the strings from the correct place.

To do so, please go to the WPML -> Support -> Troubleshooting page and click the Show custom MO Files Pre-generation dialog box button. In the dialog that appears, click the blue button to regenerate custom MO files.

If this step alone doesn't fix the issue, it is likely that the string you're experiencing issues with come from a native MO file, for those cases you need to manually create copies of the MO files and rename them to match the new language locale.

Both alternatives are described here in the errata:

https://wpml.org/errata/string-translations-are-not-displayed-when-a-language-locale-is-changed/

Please give it a try and let us know the results.
Mateus

June 28, 2024 at 9:35 pm #15854342

adrienR-5

Hello Mateus,

Awesome thank you so much for the quick reply, it fixed my issue!

Have a great week-end.