Hi - just looking at this closed issue: https://github.com/mautic/mautic/issues/2112 which request the enhancement of using ISO country codes to describe countries rather than an arbitrary list of countries that don’t map well to any “authoritative” country list, which uses a hodgepodge of full (English, mostly) names as is currently the case.
I note that this lists is in app/bundles/CoreBundle/Assets/json/countries.json
This makes using the Contact API quite difficult when it comes to managing country assignments… because countries have to be specified using Mautic’s own quirky definitions… requiring complex mapping, across character encoding types, too, if one is unlucky.
I also note that there’re are localised country lists, mapped to ISO 2 letter country codes, in the codebase already, e.g. for the English locale: vendor/symfony/intl/Resources/data/regions/en.json
It’d be a huge help to have these ISO standards references stored in the DB rather than the arbitrary (and unlocaliseable) names as is currently the case (e.g. as stored in leads->country)… seems like it’d make Mautic devs’ lives easier too, by far… although it’ll be a painful transition in the short term.
This is an urgent need. Mautic needs to use a standard country name list. Most of integrations or implementations break because the country names do not match with the mautic list
Heh, thanks for adding your voice @bellafronte - yeah, I’ve had to write a country translation layer substantially complicating my API implementation… So it’d be cool if this got fixed!
I understand your headache @lightweight just because Mautic call US United States, and not United States Of America, I need to get a way to translate all countries names. This is painful.
It is sad to know that Mautic advances in so many novelties but with simple questions like this one is given no attention. I meet requests for more than 3 years for this problem and nothing is changed.
Yes, it’s a problem… Mautic is an impressive tool… but it has some very strange blind spots… I wish, for example, that these issues were in a Git project system (like a Gitlab) rather than in a forum…
Given how deeply embedded this country stuff is within their data schema (they store country names in the DB, rather than indices into a country table!) it’d be a total nightmare to fix this architectural problem… So, I feel some sympathy for the Mautic dev team having to wrestle with such an unfortunate early decision, no doubt made out of expedience, to define their own country list…
For what it’s worth, I wrote a parser (in PHP) to create the mapping between an ISO country list (using 2 letter country codes mapped to full names) and the Mautic-specific country list… note, it’s not a strict 1-to-1 mapping.
@lightweight Mautic uses two JSON files to which provide the country and states names. They are located in /app/bundles/CoreBundle/Assets/json/countries.json and /app/bundles/CoreBundle/Assets/json/regions.json
As we do more integrations and get more customers in more countries, this is creating an issue as we are having to drop both country and state from our api updates from our ecomm front end to Mautic using our middleware.
All of our transactional systems are using ISO-2 naming conventions. IE US CA for United States, California.
Yes, Yes and YES. This needs changing immediately. It’s been way too long, just spent hours trying to map this to simply communicate between two apps. Still doesn’t work. THIS IS PAINFUL!!!
ok I unzipped and uploaded it via ftp, cleared cache then tried installing it via the plugins page on mautic. Clicked the install button but nothing yet…