I'm using 2 apis, being https://api.nationalize.io/?name= to guess someone's nationality from their name, and http://country.io/names.json to convert the two letter country code to a country name. This system works great, but while testing I noticed the name corrine returned SQ as the nationality. The api uses ISO 3166-1 alpha-2, but SQ doesn't represent any country in this system. Another naming system says it represents Albania, but Albania is returned as AL from the api. Please help
Test : https://api.nationalize.io/?name=corrine Albania : https://api.nationalize.io/?name=Alteo
Tried looking for countries with SQ tag, but couldn't find any
Yes, the SQ is wrong. The right result is SG, not SQ.
So, we can try to create conditional like this:
Anyway, you can check my project in the nametionalize.vercel.app. Happy coding!