[GH-ISSUE #16] Additional Language Codes (ISO-639-1) #10

Closed
opened 2026-03-03 14:33:54 +03:00 by kerem · 5 comments
Owner

Originally created by @leipert on GitHub (May 11, 2014).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/16

Flags are often used as symbol for languages. What do you think about implementing ISO-639-1 for language flags?

For example:
flag-icon-lang-de would be the same as flag-icon-de, but flag-icon-lang-en would be the same as flag-icon-gb

Originally created by @leipert on GitHub (May 11, 2014). Original GitHub issue: https://github.com/lipis/flag-icons/issues/16 Flags are often used as symbol for languages. What do you think about implementing [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for language flags? For example: `flag-icon-lang-de` would be the same as `flag-icon-de`, but `flag-icon-lang-en` would be the same as `flag-icon-gb`
kerem closed this issue 2026-03-03 14:33:54 +03:00
Author
Owner

@lipis commented on GitHub (May 15, 2014):

I'm getting lots of requests about that issue and the problem is that there is no official list of all the languages with their corresponding flag.. because simply flags are belonging to the countries..!

Why using the british flag for the english instead of the US... I'm pretty sure the americans would totally prefer that.. and we didn't ask the australians.. :) same for spanish and many others..

So officially I don't think that we could cover all the languages without upsetting someone.. but it's quite easy to make some updates to the .less file to match your needs and add whatever flag you want to your language. I myself also needed that for another project, so you can check the example on how it works: https://github.com/gae-init/gae-init-babel/blob/master/main/static/src/style/locale.less

.flag-icon(@country, @locale) {
  .flag-icon-@{locale} {
    background-image: ~"url(@{flag-icon-css-path}/4x3/@{country}.svg)";
    &.flag-icon-squared {
      background-image: ~"url(@{flag-icon-css-path}/1x1/@{country}.svg)";
    }
  }
}

.flag-icon(gb, en);
.flag-icon(gr, el);
.flag-icon(ar, es);

and then using .flag-icon-en with the gb flag :)

<!-- gh-comment-id:43269791 --> @lipis commented on GitHub (May 15, 2014): I'm getting lots of requests about that issue and the problem is that there is no official list of all the languages with their corresponding flag.. because simply flags are belonging to the countries..! Why using the british flag for the english instead of the US... I'm pretty sure the americans would totally prefer that.. and we didn't ask the australians.. :) same for spanish and many others.. So officially I don't think that we could cover all the languages without upsetting someone.. but it's quite easy to make some updates to the .less file to match your needs and add whatever flag you want to your language. I myself also needed that for another project, so you can check the example on how it works: https://github.com/gae-init/gae-init-babel/blob/master/main/static/src/style/locale.less ``` less .flag-icon(@country, @locale) { .flag-icon-@{locale} { background-image: ~"url(@{flag-icon-css-path}/4x3/@{country}.svg)"; &.flag-icon-squared { background-image: ~"url(@{flag-icon-css-path}/1x1/@{country}.svg)"; } } } .flag-icon(gb, en); .flag-icon(gr, el); .flag-icon(ar, es); ``` and then using `.flag-icon-en` with the `gb` flag :)
Author
Owner

@rvanlaak commented on GitHub (May 22, 2014):

So what do you recommend when en is needed? The locale in my application everywhere is en instead of gb or us.

<!-- gh-comment-id:43888627 --> @rvanlaak commented on GitHub (May 22, 2014): So what do you recommend when `en` is needed? The locale in my application everywhere is `en` instead of `gb` or `us`.
Author
Owner

@lipis commented on GitHub (May 22, 2014):

@Rvanlaak If you do the above override then you will be able to use the .flag-icon-en instead of the .flag-icon-gb which is also what I'm using in my other app when I use en for the locale and I want to use a flag for it..

<!-- gh-comment-id:43897698 --> @lipis commented on GitHub (May 22, 2014): @Rvanlaak If you do the above override then you will be able to use the `.flag-icon-en` instead of the `.flag-icon-gb` which is also what I'm using in my other app when I use `en` for the locale and I want to use a flag for it..
Author
Owner

@mdxs commented on GitHub (Jun 12, 2014):

Representing languages with national flags is problematic; as explained in http://flagsarenotlanguages.com/blog/why-flags-do-not-represent-language/

That doesn't mean flags cannot be used (if your audience understands them), but probably only as a supplementary visual cue; for that the method described by @lipis can be followed.

My vote: -1 for this feature request.

<!-- gh-comment-id:45947880 --> @mdxs commented on GitHub (Jun 12, 2014): Representing languages with national flags is problematic; as explained in http://flagsarenotlanguages.com/blog/why-flags-do-not-represent-language/ That doesn't mean flags cannot be used (if your audience understands them), but probably only as a supplementary visual cue; for that the method described by @lipis can be followed. My vote: -1 for this feature request.
Author
Owner

@lipis commented on GitHub (Jun 12, 2014):

I think with that nice link we can close this issue for one more time :)

Flags are for countries.. how people are going to use them is another thing and the method I described above is very very simple..!

<!-- gh-comment-id:45948485 --> @lipis commented on GitHub (Jun 12, 2014): I think with that nice link we can close this issue for one more time :) Flags are for countries.. how people are going to use them is another thing and the method I described above is very very simple..!
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#10
No description provided.