Language code and country code on the URL I've been trying to achieve this:

I have a multilingual site with 8 languages (en, fr, es, de, etc) and I want to make all those language available for all countries.

I want Drupal to understand that:


/en-CO alias of /en
/en-FR alias of /en
/es-US alias of /es
/es-AR alias of /es
/fr-CO alias of /fr
/de-US alias of /de


And so on... (They share the exact same content)

If I add all those custom languages is easy, but I don't want because more than 1600 combinations are posible.

Do you know if there is a way to achieve that programmatically or with a module ?

I'm currently looking into PathProcessor, but no result for now.

Any help would be greatly appreciated.
I achieved this using Persistent URLs: https://www.drupal.org/project/purl and a custom LanguageNegotiation plugin