• Resolved marashmallow

    (@marashmallow)


    Hello,

    I’m encountering an issue while trying to add the language code es_419 (Spanish for Latin America) to my Polylang setup. The system doesn’t seem to allow this language code, and I suspect it might be because it contains numbers.

    1. Are language codes containing numbers generally disallowed in Polylang?
    2. Is there an alternative way to add Spanish for Latin America to my site using Polylang?
    3. If this is a limitation, are there plans to support these types of language codes in the future?

    Any insights or workarounds would be greatly appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Chouby

    (@chouby)

    Hello,
    Yes we restrict the language code to a-z, _and - characters. This however doesn’t restrict you in the languages you can use. These are just the characters for the language that are used in the URLs. The easiest is to use es if you don’t have other Spanish languages on your site or you can use something like es-lat. It doesn’t really matter.
    es_419 however is a valid locale that you can use. However it is currently not supported by WordPress (meaning that no translation is available for this language) as WordPress uses one locale per Spanish speaking country: es_AR, es_CL, es_MX etc… See https://translate.www.ads-software.com/.
    So while it’s possible to use es_419 as locale, this means that you’ll have to provide all the WordPress translations when you could benefit from the community translations if you are using an existing locale.

    Thread Starter marashmallow

    (@marashmallow)

    Thanks for your reply. I hadn’t considered the wider underlying support necessary from WordPress itself for this feature. I note that someone tried making the case for adding es-419 as an included sub-domain here on make.www.ads-software.com, but received no positive response.

    Plugin Author Chouby

    (@chouby)

    On our side, we will allow numbers in language code in version 3.7. See https://github.com/polylang/polylang/pull/1546

    Thread Starter marashmallow

    (@marashmallow)

    Thanks! That’s useful to know.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.