Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Remove flags from language representations #313

Closed
edgerunner opened this issue May 24, 2020 · 9 comments
Closed

RFC: Remove flags from language representations #313

edgerunner opened this issue May 24, 2020 · 9 comments
Labels

Comments

@edgerunner
Copy link

edgerunner commented May 24, 2020

There's a strong argument against using flags to represent languages. Flags are symbols for countries, however, a language may be spoken in many countries while a single country may have multiple official+unofficial languages. This makes flags at least a weak, usually blatantly wrong, and in some cases offensive representation for a language.

Here's a good summary resource for this argument: http://www.flagsarenotlanguages.com/blog/why-flags-do-not-represent-language/

I believe it would be a good decision to drop flags from the progress report panel and anywhere else in the UI.

image

The exception may be when the language key includes a locale. en is English without geographical context, so it could be for UK, Australia, Malta or India, or even Japan, you wouldn't know. en-US is clearly for United States, which makes it ok (but still unnecessary) to use a flag.

I believe the best representation would be the name of the language in itself, optionally followed by the name of the language in the language of the editor/OS

  • English
  • Français - French
  • Svenska - Swedish
  • Türkçe - Turkish
@antfu antfu pinned this issue May 24, 2020
@antfu antfu added the rfc label May 24, 2020
@antfu
Copy link
Contributor

antfu commented May 24, 2020

Emmm... I don't know. I am happy to provide a config field to disable flags if anyone feels being "offensive" (although it's absolutely not intentional).

Anyway, I am feeling that I am not knowledgeable enough to make the decision (to completely drop it). I have pinned this issue and labeled rfc. I would love to hear comments from anyone. Thanks in advance.

@antfu antfu changed the title Remove flags from language representations RFC: Remove flags from language representations May 24, 2020
@PeterPanZH
Copy link

Maybe a config field is a good idea.

antfu added a commit that referenced this issue May 28, 2020
@edgerunner
Copy link
Author

edgerunner commented May 28, 2020

Also, please do not confuse the ISO 639-1 language code with the ISO 3166-1 country code.

ca in ISO 639-1 stands for the Catalan language, spoken mostly in Barcelona, Spain and surroundings, as well as being the official language of Andorra (whose population can fit entirely in FC Barcelona's stadium with room to spare)

ca in ISO 3166-1 stands for Canada, across the Atlantic ocean.

image

This is quite a hairy issue, best avoided 😬🤯😅

@antfu
Copy link
Contributor

antfu commented May 28, 2020

Thanks for the info! Will fix it.

@edgerunner
Copy link
Author

Good luck with that :)
Made a spreadsheet for you with the fake match between country and language codes.

Out of the 186 language codes and 250 country codes, there are 110 codes that match. Out of those 110 matches, only 22 of them have some semblance of connection between the country and the language (ie. at least it is an official/major language there).

88 matches in that list are almost totally wrong outright.

@antfu
Copy link
Contributor

antfu commented May 29, 2020

@edgerunner wow, thanks a lot! How do you get the results? Do you have any tools or just by manually checking?

@edgerunner
Copy link
Author

edgerunner commented May 29, 2020

Just went through the list and marked the (somewhat) relevant ones. Took about 3 minutes. I may have missed one or two. (update: I missed four apparently. The score is still 26-84)

My point is: This is a bottomless hole. Don't jump in 😅

antfu added a commit that referenced this issue May 29, 2020
@antfu
Copy link
Contributor

antfu commented May 29, 2020

I am trying to find some balance point to this issue.

Now in v2.2.4

Config to disable the flags

"i18n-ally.showFlags": false

Not to use language code as country code

Two letters locales are not be used as country code to display flags anymore. While BCP-47 with region/country code will try to match a flags

image

If you have preference on mapping a two letter locale to country code, you can do it in config:

"i18n-ally.localeCountryMap": {
  "en": "br", // show UK's flag instead of US's
  "zh": "cn", // show Chinese flag for 'zh'
  "ko": "ko", // show Korean flag for 'ko'
}

Let me know if you have any comments. Thanks

@edgerunner
Copy link
Author

You're getting things done at breakneck speed 🚀 ❤️
I think it is great as it is :)

@antfu antfu unpinned this issue May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants