[GH-ISSUE #510] Language To Country , ISO 639-1 > ISO 3166-1-alpha-2 code #309

Closed
opened 2026-03-03 14:37:24 +03:00 by kerem · 3 comments
Owner

Originally created by @hondnl on GitHub (Nov 26, 2018).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/510

Hi there , first of all , thanks for all the work you have done!

I know this issue has been discussed endlessly , but it would be great to explore at least a possibility.
By matching multiple lists of languages/countries , their origin and where they are spoken the most , putting it all in a database,it spit out an interesting list.

First of all some languages just do not have their origin in a single country (borders) or known most for a certain flag.
The great thing is , is that most languages (without borders) have their own flag. That would solve some of the issues.

Others can be solved by a common flag. Like the Arabic language... We could use the Arab League flag for it. Never perfect , but close enough to use it.

The following list is in my opinion a good start, it needs to get expanded and fine tuned .. but it is a start.

Off course you could always edit the list to your needs...
A very common one ; en > gb , a user could overwrite it to en > us if they would want a different flag.

ISO 639-1 > ISO 3166-1-alpha-2

If the country does not exists , a "new" ISO 3166-1-alpha-2 number that does not exists yet ,is proposed.

{
    "aa": "dj",
    "af": "za",
    "ak": "gh",
    "sq": "al",
    "am": "et",
    "ar": {
        "proposed_iso_3166": "aa",
        "flag": "https:\/\/en.wikipedia.org\/wiki\/Flag_of_the_Arab_League",
        "name": "Arab League"
    },
    "hy": "am",
    "ay": {
        "proposed_iso_3166": "wh",
        "flag": "https:\/\/en.wikipedia.org\/wiki\/Wiphala",
        "name": "Wiphala"
    },
    "az": "az",
    "bm": "ml",
    "be": "by",
    "bn": "bd",
    "bi": "vu",
    "bs": "ba",
    "bg": "bg",
    "my": "mm",
    "ca": "ad",
    "zh": "cn",
    "hr": "hr",
    "cs": "cz",
    "da": "dk",
    "dv": "mv",
    "nl": "nl",
    "dz": "bt",
    "en": "gb",
    "et": "ee",
    "ee": {
        "proposed_iso_3166": "ew",
        "flag": "https:\/\/en.wikipedia.org\/wiki\/Ewe_people#\/media\/File:Flag_of_the_Ewe_people.svg",
        "name": "Ewe"
    },
    "fj": "fj",
    "fil": "ph",
    "fi": "fi",
    "fr": "fr",
    "ff": {
        "proposed_iso_3166": "ff",
        "flag": "https:\/\/www.nationstates.net\/images\/flags\/uploads\/fulah__403173.png",
        "name": "Fulah"
    },
    "gaa": "gh",
    "ka": "ge",
    "de": "de",
    "el": "gr",
    "gn": {
        "proposed_iso_3166": "gx",
        "flag": "https:\/\/www.crwflags.com\/fotw\/flags\/xg.html",
        "name": "Guarani"
    },
    "gu": "in",
    "ht": "ht",
    "ha": {
        "proposed_iso_3166": "ha",
        "flag": "https:\/\/www.crwflags.com\/fotw\/flags\/ng%7Dhausa.html",
        "name": "Hausa"
    },
    "he": "il",
    "hi": "in",
    "ho": "pg",
    "hu": "hu",
    "is": "is",
    "ig": "ng",
    "id": "id",
    "ga": "ie",
    "it": "it",
    "ja": "jp",
    "kr": "ne",
    "kk": "kz",
    "km": "kh",
    "kmb": "ao",
    "rw": "rw",
    "kg": "cg",
    "ko": "kr",
    "kj": "ao",
    "ku": "iq",
    "ky": "kg",
    "lo": "la",
    "la": "va",
    "lv": "lv",
    "ln": "cg",
    "lt": "lt",
    "lu": "cd",
    "lb": "lu",
    "mk": "mk",
    "mg": "mg",
    "ms": "my",
    "mt": "mt",
    "mi": "nz",
    "mh": "mh",
    "mn": "mn",
    "mos": "bf",
    "ne": "np",
    "nd": "zw",
    "nso": "za",
    "no": "no",
    "nb": "no",
    "nn": "no",
    "ny": "mw",
    "pap": "aw",
    "ps": "af",
    "fa": "ir",
    "pl": "pl",
    "pt": "pt",
    "pa": "in",
    "qu": "wh",
    "ro": "ro",
    "rm": "ch",
    "rn": "bi",
    "ru": "ru",
    "sg": "cf",
    "sr": "rs",
    "srr": "sn",
    "sn": "zw",
    "si": "lk",
    "sk": "sk",
    "sl": "si",
    "so": "so",
    "snk": "sn",
    "nr": "za",
    "st": "ls",
    "es": "es",
    "sw": {
        "proposed_iso_3166": "sw",
        "flag": "https:\/\/commons.wikimedia.org\/wiki\/File:Flag_of_Swahili.gif",
        "name": "Swahili"
    },
    "ss": "sz",
    "sv": "se",
    "tl": "ph",
    "tg": "tj",
    "ta": "lk",
    "te": "in",
    "tet": "tl",
    "th": "th",
    "ti": "er",
    "tpi": "pg",
    "ts": "za",
    "tn": "bw",
    "tr": "tr",
    "tk": "tm",
    "uk": "ua",
    "umb": "ao",
    "ur": "pk",
    "uz": "uz",
    "ve": "za",
    "vi": "vn",
    "cy": "gb",
    "wo": "sn",
    "xh": "za",
    "yo": {
        "proposed_iso_3166": "yo",
        "flag": "https:\/\/www.crwflags.com\/fotw\/flags\/ng%7Dyorub.html",
        "name": "Yoruba"
    },
    "zu": "za"
}
Originally created by @hondnl on GitHub (Nov 26, 2018). Original GitHub issue: https://github.com/lipis/flag-icons/issues/510 Hi there , first of all , thanks for all the work you have done! I know this issue has been discussed endlessly , but it would be great to explore at least a possibility. By matching multiple lists of languages/countries , their origin and where they are spoken the most , putting it all in a database,it spit out an interesting list. First of all some languages just do not have their origin in a single country (borders) or known most for a certain flag. The great thing is , is that most languages (without borders) have their own flag. That would solve some of the issues. Others can be solved by a common flag. Like the Arabic language... We could use the Arab League flag for it. Never perfect , but close enough to use it. The following list is in my opinion a good start, it needs to get expanded and fine tuned .. but it is a start. Off course you could always edit the list to your needs... A very common one ; en > gb , a user could overwrite it to en > us if they would want a different flag. **ISO 639-1 > ISO 3166-1-alpha-2** If the country does not exists , a "new" ISO 3166-1-alpha-2 number that does not exists yet ,is proposed. ```json { "aa": "dj", "af": "za", "ak": "gh", "sq": "al", "am": "et", "ar": { "proposed_iso_3166": "aa", "flag": "https:\/\/en.wikipedia.org\/wiki\/Flag_of_the_Arab_League", "name": "Arab League" }, "hy": "am", "ay": { "proposed_iso_3166": "wh", "flag": "https:\/\/en.wikipedia.org\/wiki\/Wiphala", "name": "Wiphala" }, "az": "az", "bm": "ml", "be": "by", "bn": "bd", "bi": "vu", "bs": "ba", "bg": "bg", "my": "mm", "ca": "ad", "zh": "cn", "hr": "hr", "cs": "cz", "da": "dk", "dv": "mv", "nl": "nl", "dz": "bt", "en": "gb", "et": "ee", "ee": { "proposed_iso_3166": "ew", "flag": "https:\/\/en.wikipedia.org\/wiki\/Ewe_people#\/media\/File:Flag_of_the_Ewe_people.svg", "name": "Ewe" }, "fj": "fj", "fil": "ph", "fi": "fi", "fr": "fr", "ff": { "proposed_iso_3166": "ff", "flag": "https:\/\/www.nationstates.net\/images\/flags\/uploads\/fulah__403173.png", "name": "Fulah" }, "gaa": "gh", "ka": "ge", "de": "de", "el": "gr", "gn": { "proposed_iso_3166": "gx", "flag": "https:\/\/www.crwflags.com\/fotw\/flags\/xg.html", "name": "Guarani" }, "gu": "in", "ht": "ht", "ha": { "proposed_iso_3166": "ha", "flag": "https:\/\/www.crwflags.com\/fotw\/flags\/ng%7Dhausa.html", "name": "Hausa" }, "he": "il", "hi": "in", "ho": "pg", "hu": "hu", "is": "is", "ig": "ng", "id": "id", "ga": "ie", "it": "it", "ja": "jp", "kr": "ne", "kk": "kz", "km": "kh", "kmb": "ao", "rw": "rw", "kg": "cg", "ko": "kr", "kj": "ao", "ku": "iq", "ky": "kg", "lo": "la", "la": "va", "lv": "lv", "ln": "cg", "lt": "lt", "lu": "cd", "lb": "lu", "mk": "mk", "mg": "mg", "ms": "my", "mt": "mt", "mi": "nz", "mh": "mh", "mn": "mn", "mos": "bf", "ne": "np", "nd": "zw", "nso": "za", "no": "no", "nb": "no", "nn": "no", "ny": "mw", "pap": "aw", "ps": "af", "fa": "ir", "pl": "pl", "pt": "pt", "pa": "in", "qu": "wh", "ro": "ro", "rm": "ch", "rn": "bi", "ru": "ru", "sg": "cf", "sr": "rs", "srr": "sn", "sn": "zw", "si": "lk", "sk": "sk", "sl": "si", "so": "so", "snk": "sn", "nr": "za", "st": "ls", "es": "es", "sw": { "proposed_iso_3166": "sw", "flag": "https:\/\/commons.wikimedia.org\/wiki\/File:Flag_of_Swahili.gif", "name": "Swahili" }, "ss": "sz", "sv": "se", "tl": "ph", "tg": "tj", "ta": "lk", "te": "in", "tet": "tl", "th": "th", "ti": "er", "tpi": "pg", "ts": "za", "tn": "bw", "tr": "tr", "tk": "tm", "uk": "ua", "umb": "ao", "ur": "pk", "uz": "uz", "ve": "za", "vi": "vn", "cy": "gb", "wo": "sn", "xh": "za", "yo": { "proposed_iso_3166": "yo", "flag": "https:\/\/www.crwflags.com\/fotw\/flags\/ng%7Dyorub.html", "name": "Yoruba" }, "zu": "za" } ```
kerem closed this issue 2026-03-03 14:37:25 +03:00
Author
Owner

@sktwentysix commented on GitHub (Dec 5, 2018):

I love the idea of ISO 639-1 support. Having some form of visual representation, while subjective, would be great.

However, there are a lot of languages in the spec that just do not have any representation in the form of a flag. Take Yoruba as an example, an ethnic group of people mainly found in Nigeria, but numerous other countries too. There are no credible flags to represent the ethnic people themselves other than this crude gif I found - https://www.crwflags.com/fotw/flags/ng%7Dyorub.html

A collection of ISO 639-1 icons would be great but somewhat controversial

<!-- gh-comment-id:444446067 --> @sktwentysix commented on GitHub (Dec 5, 2018): I love the idea of ISO 639-1 support. Having some form of visual representation, while subjective, would be great. However, there are a lot of languages in the spec that just do not have any representation in the form of a flag. Take Yoruba as an example, an ethnic group of people mainly found in Nigeria, but numerous other countries too. There are no credible flags to represent the ethnic people themselves other than this crude gif I found - https://www.crwflags.com/fotw/flags/ng%7Dyorub.html A collection of ISO 639-1 icons would be great but somewhat controversial
Author
Owner

@lipis commented on GitHub (Jan 28, 2019):

Yes, we've been through the language topic a lot.. and I still believe that it's outside of the scope of this project. This project is about flags.. country flags!

<!-- gh-comment-id:458084839 --> @lipis commented on GitHub (Jan 28, 2019): Yes, we've been through the language topic a lot.. and I still believe that it's outside of the scope of this project. This project is about flags.. country flags!
Author
Owner

@JulienCabanes commented on GitHub (Oct 4, 2019):

@hondnl thank you for the mapping, I'll use that!

<!-- gh-comment-id:538282259 --> @JulienCabanes commented on GitHub (Oct 4, 2019): @hondnl thank you for the mapping, I'll use that!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flag-icons#309
No description provided.