Skip Navigation

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
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Andreas W. 8 months, 3 weeks ago.

Assisted by: Andreas W..

Author Posts
April 20, 2024 at 11:58 am #15546042

kerryfishU

I am trying to:
add en_US as custom lang, my site is setup as UK/ GB english in settings and i have a variable wplang set to define( 'WP_LANG','en_GB' );
the site may have been setup initially US english but any wp updates are now loaded in en_GB, site lang = uk english, and all the files in wpml dirs are prefixed with en_GB

i hard removed WPML full reset etc and starting again setting up WPML it somhow picks up the default locale as en_US and stops me adding a USA custom language at setup.

where do i need to change to have my default lang EN_GB so when WPML starts installing and setting up it load english as the correct locale? ie en_GB

Link to a page where the issue can be seen:
hidden link

I expected to see:
add US as a new custom lang and have en_US locale available to use

Instead, I got:
unable to use the en_US locale to set a custom lang as its already in use, but the site lang is uk english.

wpmllang3.jpg
wpmllang2.jpg
wpmllang1.jpg
April 20, 2024 at 7:42 pm #15546409

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

The default locale en_US is the default for English in WordPress and WPML.

Please go to WPML > Languages > Edit languages.

In English change the default local from en_US to en_GB.

Now add your custom language using the default locate en_US.

If this will not solve the issue, please let me know.

Best regards
Andreas

April 22, 2024 at 9:21 am #15548921

kerryfishU

Thanks , yes this works, just not intutive when you use custom at setup time. the new language is added but does not have a seperate translation language, i know this is not the exact use of WPML but portugeses has two variants as has chinese so english should have a varient for US, Aust etc. Am i better off with multisite to achieve distinct site for UK , USA etc

April 23, 2024 at 2:15 pm #15556610

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Yes, I understand - What you actually would do in this case is change the default locale for the pre-installed English language to en_GB and then create a custom language for en_US.

We use en_US as the default, as this is the default locale that WordPress uses for its language files.

Creating a custom language would be exactly the way to go.

If you wish, I can offer to open an internal escalation and ask for a feature request to add a new language, in this case, one for English-US, one for English-GB, and maybe even English-AU.

Would you like me to open such a ticket?

About the Multisite approach:

I understand that this is a way to display different websites in different languages but take note that this way you will not be able to sync any contents between sites - you will have to connect them all manually and for example, WooCoommerce products will not run in sync, as each Multisite has its database tables.

The topic ‘[Closed] cant add en_US as custom lang’ is closed to new replies.