[GH-ISSUE #85] ISO 3166-1 alpha-3 #53

Closed
opened 2026-03-03 14:34:14 +03:00 by kerem · 16 comments
Owner

Originally created by @Filoz on GitHub (Jul 14, 2015).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/85

Hi,
great job!
Did you think about add also the ISO 3166-1 alpha-3 code?
It should be not so difficult... something like this:
before:

.flag-icon-it {
  background-image: url(../flags/4x3/it.svg);
}

after

.flag-icon-it, .flag-icon-ita  {
  background-image: url(../flags/4x3/it.svg);
}

Thankyou!

Originally created by @Filoz on GitHub (Jul 14, 2015). Original GitHub issue: https://github.com/lipis/flag-icons/issues/85 Hi, great job! Did you think about add also the ISO 3166-1 alpha-3 code? It should be not so difficult... something like this: before: ``` css .flag-icon-it { background-image: url(../flags/4x3/it.svg); } ``` after ``` css .flag-icon-it, .flag-icon-ita { background-image: url(../flags/4x3/it.svg); } ``` Thankyou!
kerem closed this issue 2026-03-03 14:34:14 +03:00
Author
Owner

@lipis commented on GitHub (Jul 14, 2015):

Is it really needed?

<!-- gh-comment-id:121183469 --> @lipis commented on GitHub (Jul 14, 2015): Is it really needed?
Author
Owner

@Filoz commented on GitHub (Jul 14, 2015):

I think it could be... and it should not be so difficult to do.
Many people prefer to save in their application alpha-3 code rather then alpha-2.

<!-- gh-comment-id:121234973 --> @Filoz commented on GitHub (Jul 14, 2015): I think it could be... and it should not be so difficult to do. Many people prefer to save in their application alpha-3 code rather then alpha-2.
Author
Owner

@Filoz commented on GitHub (Jul 14, 2015):

In order to keep a smaller size for the css file, it could be created a version with only alpha-3 so the user can choose which one to use (alpha-2.css or alpha-3.css).

<!-- gh-comment-id:121235812 --> @Filoz commented on GitHub (Jul 14, 2015): In order to keep a smaller size for the css file, it could be created a version with only alpha-3 so the user can choose which one to use (alpha-2.css or alpha-3.css).
Author
Owner

@lipis commented on GitHub (Sep 4, 2015):

sorry.. too much trouble

<!-- gh-comment-id:137796201 --> @lipis commented on GitHub (Sep 4, 2015): sorry.. too much trouble
Author
Owner

@ninjanye commented on GitHub (Sep 11, 2015):

This would be useful to me too. Would you accept a pull request to address this issue? I'd be happy to do it

<!-- gh-comment-id:139546843 --> @ninjanye commented on GitHub (Sep 11, 2015): This would be useful to me too. Would you accept a pull request to address this issue? I'd be happy to do it
Author
Owner

@lipis commented on GitHub (Sep 11, 2015):

@ninjanye no.. sorry

<!-- gh-comment-id:139547322 --> @lipis commented on GitHub (Sep 11, 2015): @ninjanye no.. sorry
Author
Owner

@Filoz commented on GitHub (Sep 11, 2015):

@ninjanye give a look to this repo: https://github.com/7kfpun/flag-css

<!-- gh-comment-id:139550211 --> @Filoz commented on GitHub (Sep 11, 2015): @ninjanye give a look to this repo: https://github.com/7kfpun/flag-css
Author
Owner

@ninjanye commented on GitHub (Sep 14, 2015):

Thanks @Filoz. For what it is worth, I have forked the repo and added all the ISO3166 Alpha-3 characters.

My repository is here: https://github.com/ninjanye/flag-icon-css

The result is as follows:

.flag-icon-gr,
.flag-icon-grc {
  background-image: url(../flags/4x3/gr.svg);
}
.flag-icon-gr.flag-icon-squared,
.flag-icon-grc.flag-icon-squared {
  background-image: url(../flags/1x1/gr.svg);
}
<!-- gh-comment-id:140200908 --> @ninjanye commented on GitHub (Sep 14, 2015): Thanks @Filoz. For what it is worth, I have forked the repo and added all the [ISO3166 Alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) characters. My repository is here: https://github.com/ninjanye/flag-icon-css The result is as follows: ``` .flag-icon-gr, .flag-icon-grc { background-image: url(../flags/4x3/gr.svg); } .flag-icon-gr.flag-icon-squared, .flag-icon-grc.flag-icon-squared { background-image: url(../flags/1x1/gr.svg); } ```
Author
Owner

@mikeclagg commented on GitHub (Sep 23, 2015):

I forked it and converted it to 3 digit last night. Our geolocation uses the 3 digit code. I will also be supporting the 2 digit as well.

<!-- gh-comment-id:142628836 --> @mikeclagg commented on GitHub (Sep 23, 2015): I forked it and converted it to 3 digit last night. Our geolocation uses the 3 digit code. I will also be supporting the 2 digit as well.
Author
Owner

@ninjanye commented on GitHub (Sep 23, 2015):

Does that differ from my fork? https://github.com/ninjanye/flag-icon-css

<!-- gh-comment-id:142646769 --> @ninjanye commented on GitHub (Sep 23, 2015): Does that differ from my fork? https://github.com/ninjanye/flag-icon-css
Author
Owner

@lipis commented on GitHub (Sep 23, 2015):

@ninjanye yes.. @belikemike's version doesn't support 2-digit code :)

<!-- gh-comment-id:142654824 --> @lipis commented on GitHub (Sep 23, 2015): @ninjanye yes.. @belikemike's version doesn't support 2-digit code :)
Author
Owner

@mikeclagg commented on GitHub (Sep 23, 2015):

Not yet, I needed 3 currently, working on supporting both. I am open to project organization suggestions.
https://github.com/belikemike/flag-icon-css

<!-- gh-comment-id:142659420 --> @mikeclagg commented on GitHub (Sep 23, 2015): Not yet, I needed 3 currently, working on supporting both. I am open to project organization suggestions. https://github.com/belikemike/flag-icon-css
Author
Owner

@ninjanye commented on GitHub (Sep 24, 2015):

Ah, ok. If it helps you, the fork I made already has support for both 2 and 3 digit codes

<!-- gh-comment-id:142848088 --> @ninjanye commented on GitHub (Sep 24, 2015): Ah, ok. If it helps you, the fork I made already has support for both 2 and 3 digit codes
Author
Owner

@mikeclagg commented on GitHub (Sep 24, 2015):

I was confused when because I only saw a few 3 digit svg files. Looking into the last commits I see your approach. Take my flags if you want, but as Lipis pointed out, I am not fan of both at the same time as since we don't use 2 digit codes.

<!-- gh-comment-id:143008224 --> @mikeclagg commented on GitHub (Sep 24, 2015): I was confused when because I only saw a few 3 digit svg files. Looking into the last commits I see your approach. Take my flags if you want, but as Lipis pointed out, I am not fan of both at the same time as since we don't use 2 digit codes.
Author
Owner

@jgpacheco commented on GitHub (Mar 19, 2018):

Why not merge @ninjanye fork to main repo?

<!-- gh-comment-id:374325505 --> @jgpacheco commented on GitHub (Mar 19, 2018): Why not merge @ninjanye fork to main repo?
Author
Owner

@koesper commented on GitHub (Feb 10, 2021):

Ran into the same problem as well, it seems like @ninjanye's solution is perfect!
Unfortunately that repo is now stale, so merging it here would benefit from the active maintenance, while adding very little complexity!

<!-- gh-comment-id:776664832 --> @koesper commented on GitHub (Feb 10, 2021): Ran into the same problem as well, it seems like @ninjanye's solution is perfect! Unfortunately that repo is now stale, so merging it here would benefit from the active maintenance, while adding very little complexity!
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#53
No description provided.