WordPress.org

Forums

Polylang
Language codes from each country (4 posts)

  1. miguelcortereal
    Member
    Posted 1 year ago #

    This is a basic question but can't find the answer anywhere.

    My site has 4 defined languages en_US (default), es_ES, fr_FR and pt_PT.

    If someone from Spain, France or Portugal access the site will have his own language displaying, but if someone from Mexico, Brazil or United Kingdom make an access the displayed language will be the default in my case en_US.

    The question is:
    To have the site displaying in Spanish for someone from Mexico, should I define a new language es_ME, or is there a way to make the browsers assume just the first two letters of the language code 'es'?

    https://wordpress.org/plugins/polylang/

  2. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    Not so basic. And interesting!

    I never had such issue because my browser preferences are set as 'fr_FR', 'fr', 'en'. So if I go to a Canadian website, I am correctly served the French language. But if I would remove the 'fr' of my browser preferences, I would certainly have the kind of issues you describe. I will look for a workaround.

  3. Chouby
    Member
    Plugin Author

    Posted 1 year ago #

    I reviewed my code. And also made tests (with fr_CA as unique preferred language) on a test fr + en (default). I am correctly served French language at first visit.

    So for you, Mexican people with es_ME as unique preferred language should be served es_ES (provided that you use es as slug)

  4. miguelcortereal
    Member
    Posted 1 year ago #

    This detail makes a huge difference, bouncing rates for example.

    Polylang doing what is suppose to do.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Polylang
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.