mirror of
https://github.com/lipis/flag-icons.git
synced 2026-04-26 09:25:50 +03:00
[GH-ISSUE #236] Language Flags #154
Labels
No labels
3rd-party
3rd-party
bug
code
documentation
enhancement
fixed-in-master
flag-request
help needed
missing-flag
missing-flag
pull-request
wrong-flag
wrong-flag
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/flag-icons#154
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @matze-berg on GitHub (May 4, 2016).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/236
I have missed the possibility to get a flag by the language. So i added .flag-icon-lang-en
Here is the new flag-icon-base.scss:
@lipis commented on GitHub (May 8, 2016):
Sorry but flags belong to countries/areas.. not languages :)
@matze-berg commented on GitHub (Oct 13, 2016):
True. But do you choose country or languages for websites?
So it is possible to use them as language selector, too. And the countries are still working.
But ok. Ignore my changes if you want. Why should it be so easy to switch languages with cour flags css. ;) :P
@tomlutzenberger commented on GitHub (Oct 13, 2016):
@MatneX Flags are not always used to display languages. Also, some countries use more than one language officially.
@lipis commented on GitHub (Oct 13, 2016):
Also maintenance.. there are thousands of languages and I'm not sure how it will work with simple things.. on which flag to use for English.. US, GB, AU? So in the end of the day.. that's why you have all the sources to adjust those things to your personal needs..
@moldovans commented on GitHub (Oct 9, 2017):
really, how often do you think your package is used to reference countries, rather than languages?
Give a language its default country as fist country that matches it, and let users optionally modify that setting. Surely, languages have no flags, but your package should be flexible enough to become a popular one...
@tomlutzenberger commented on GitHub (Oct 9, 2017):
http://www.flagsarenotlanguages.com/blog/why-flags-do-not-represent-language/
@mrmckeb commented on GitHub (Oct 10, 2017):
I use flags as flags too. I understand the need that some people have for flag icons as languages, but I'd also suggest talking to your UX/design team about alternatives.
As an Australian, clicking a British flag (or a half-British half-American flag) is a learnt behaviour, but still an unintuitive one. This selection method isn't used by companies like Facebook, Google, Microsoft, etc.
@moldovans commented on GitHub (Nov 9, 2017):
@tomlutzenberger
Do you really think we are so stupid don't understand what there are countries having 2 or more languages, and a flag does not represent a language?
However, personally I don't care about this philosophy.
I need to find a way to associate a country's flag with a language, and if your library does not offer such a way, I will search another one, it's all.
You can write me a philosophical essay on the languages and countries associations, however if my client asked me to click a picture to change a language, I don't care about what do YOU or ME personally think about that question.
we are here to solve practical needs, so please let me associate a UK flag to the EN language, without telling me that is not so good my idea.
@Findus23 commented on GitHub (Nov 9, 2017):
@serhioV
I agree with, @lipis that there is no general mapping from languages to flags. But this doesn't mean that there couldn't be a mapping for a single project (e.g. because all of your German speaking users are coming from Germany and you don't make business with Austrians)
This mapping is specific to your use case and therefore should be build in your program. Just write a function that takes the language you want to display and outputs the classname of the flag.
@lipis commented on GitHub (Nov 9, 2017):
@serhioV Since you are not so stupid.. do you understand that this requirement that you have for your own projects/clients, maybe it's not going to work for everyone, so there is no point of asking for any sort of implementation here..
@moldovans commented on GitHub (Nov 9, 2017):
@lipis quite sure the vast majority of library users don't have list of countries on their sites, but languages. you can go for a poll, so as long it could be the main target for users, I could ask an implementation here.
Just do a Google Search of "choose language" pictures.
@lipis commented on GitHub (Nov 9, 2017):
true.. but every website uses their own flags for whatever language they want depending which country their represent.. so there is no way to satisfy everyone by having the UK flag for English or PT for Portuguese, etc..
@moldovans commented on GitHub (Nov 9, 2017):
this is why I ask to give a developer a way to customize the language flag for a country, if the default (there should be a default) implementation does not satisfies them.
By ex by default is Romania flag for the Romanian language, but some people from Moldova would like to select the Moldova flag for the Ro language, however the large majority would like to have the Romania flag for Romania language and not to develop every time the same code, every developer by its own, to re-code a language flag for your library, if not, why do bother using your library.
@mrmckeb commented on GitHub (Nov 10, 2017):
This is no different than me complaining that
ISO 3166-1-alpha-2codes are no good for me as I needISO 3166-1 alpha-3codes.The way to fix this is to create a map. This package has worked for me before, and if it's missing some information, create a PR to help them fix it. They're very receptive and their package is designed to do exactly what you want.
https://www.npmjs.com/package/country-data