Coder Social home page Coder Social logo

Comments (5)

lipis avatar lipis commented on August 15, 2024 1

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 :)

from flag-icons.

mdxs avatar mdxs commented on August 15, 2024 1

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.

from flag-icons.

rvanlaak avatar rvanlaak commented on August 15, 2024

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

from flag-icons.

lipis avatar lipis commented on August 15, 2024

@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..

from flag-icons.

lipis avatar lipis commented on August 15, 2024

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..!

from flag-icons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.