Skip to content Skip to sidebar

Open

Overview of the issue

On the WPML setup page, when adding en_US (USA English) as a custom language, you will see an error saying “The Value en_US already exists.

Adding an existing locale

By default, WordPress, and theme authors use the en_US locale for English. This is the reason you see the following error when trying to add a custom en_US locale: “The Value en_US already exists.”

“The Value en_US already exists” error message
“The Value en_US already exists” error message

 

Workaround

Instead of adding the en_US version, you can add any the English language (en locale) used in a different country other than the United States. Then, you can manually change the default flags to the respective ones.

How to add a new custom English language:

Go to your WPML setup page under the Languages tab, and click on Create a Custom Language.

Adding a custom language in the WPML setup wizard

Choose English as the language, and select a location other than the United States (e.g., the United Kingdom). This way, the locale is set to en_GB (Language code and Country code), then click Save Language.

Adding a new language
Adding a new language

You now have two different versions of English:

  • English: This one uses the en_US locale for The United States
  • English (United Kingdom): This one uses the en_GB locale for The United Kingdom

Assign one of them as your default and the other as your translation language and continue with your WPML setup.

Selecting Default and Translation languages
Selecting Default and Translation languages

After completing your WPML setup, you can customize the language flag, as both versions are using the UK flag.

8 Responses to “How to add 'English (United States)' as a custom language to use as default or translation language”

    • Hello there,
      For adding a custom language after the set up, please follow the “Adding a Custom Language in the Languages Settings” section on this link.
      Regards

  1. If I add two english US and UK, is seo gonna work separately for them? I want Uk pages show only for UK users and US pages for US users(which will be default)

    • Hello there,
      Yes, that’s correct! If you set up two English languages, one with the locale en_GB and the other with en_US, they will function as separate, individual languages.

      Each language will have its own pages, and the lang and hreflang tags will help Google index and rank them appropriately.

      If you’re using an SEO plugin, both versions will be included in your sitemap, and you’ll be able to set unique SEO meta titles and descriptions for each.

  2. Hey,

    I have come across the issue that the iso country code is then incorrect for the US version if I implement the steps above.

    English (United Kingdom) is set to “en-gb” (which is correct), however English (United States) is then set to “en” instead of “en-us.”

    Is there a workaround for this? It seems like quite an oversight for this plugin to not accomodate the ability to set the US derivative as “en-us.”

    Thanks

    • Hi James,

      There are two important settings to keep in mind when it comes to regions.
      Default locale (en_US): This is the locale value for the language and determines which localization files are used for the translation.
      Hreflang (en or en-us): This is the language code Google expects for that language.
      You can customize both settings under WPML > Languages > Site Languages > Edit Languages.

      As a general recommendation, it is best to have one default “global” language using the two-letter format in hreflang, and then use country or region-specific versions for any additional languages. In those cases, the hreflang usually matches the locale, just in a slightly different format. For example, en_CA becomes en-ca. That is why American English is set as en, to serve as the default or catch-all English version.

      For example:
      en_US > en
      en_CA > en-ca
      en_GB > en-gb
      If a visitor from en_NZ visits your site, they should land on the general American English version.

      That said, the hreflang can be customized based on your preference.

Leave a Reply

Please stay on topic and be respectful to others. If you need help with issues not related to this post, use our Support Forum to start a chat or submit a ticket.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>