Skip to content(if available)orjump to list(if available)

The dumb reason why flag emojis aren't working on your site in Chrome on Windows

tobr

Since the article mentions using flags to represent languages, I feel obliged to point out that flags do not represent languages, so probably don’t use flags to represent languages.

Y_Y

But flags almost sometimes map roughly to languages within my limited experience! For example there's only one kind of English and it belongs to the USA. Also Spanish, that must be USA too, even if some unimportant countries speak it. Brazil can have Portuguese because I don't know where Angola is. The Indian flag can represent Hindi, but also the 22 scheduled languages, but not the other official language because I already allocated it.

This is going pretty well, but seems tedious, so for all other cases let's just merge ISO 3166-1 alpha-2 and ISO 639-1 as follows:

  SELECT 
    c.code AS common_code, 
    c.country_name, 
    l.language_name
  FROM iso_3166 c
  INNER JOIN iso_639 l
  ON c.code = l.code;
And if they don't speak Afrikaans in Afghanistan or Arabic in Argentina then you'll have to take it up with the International Organization for Standardization.

toolslive

So

    - for English, I'll use the Jamaican flag.
    - for Russian, I'll use the flag of South Ossetia. 
    - for German, I'll use the flag of Austria.
    - for French, I'll use the Malinese Flag.
    - for Dutch, I'll use flag of Suriname.
just see how happy people are with this ;)

ahoka

No, for English you should obviously use the flag of the largest country that uses it as an official language: India.

Tijdreiziger

As a Surinamese Dutch person, I fail to see any issues with this approach. ;)

harrall

We had a good budget for localization at my previous place and had like 10 Englishes and some countries had both their local language and English as options.

Tijdreiziger

Oh man, international corporations forcing me into the translation of their website is a huge pet peeve of mine, as the translation is usually poor.

Just let me choose ‘Netherlands - English’ and I’ll be on my way, please and thanks.

the_other

Nice. Even Japan (jp) and Japanese (ja) lose out with this.

immibis

"I represented some things with wrong symbols and it didn't work well, therefore the idea of using symbols to represent these things is wrong"

troad

I feel obliged to point out that while flags do not represent languages perfectly, there is no good, user-facing symbolic alternative for languages.

No, people don't know the ISO codes for their languages.

No, you can't use the full name, since some languages have very long names.

No, a single 'languages' icon isn't enough, you often need to symbolically represent individual languages.

For the most common languages, flags are fine.

bawolff

> No, people don't know the ISO codes for their languages.

As a canadian, i know what EN means. However when sites use flags its a mystery. Am i supposed to pick canada or is that "canadian french". Maybe im supposed to pick the american flag, but eww feel like a traitor and i want the u's in my words. Is it the british flag? I have no idea. Flags for languages are stupid.

Not to mention for all those languages that are not the majority language in any country.

troad

> As a canadian, i know what EN means. However when sites use flags its a mystery.

As an Australian, I somehow manage not to be entirely baffled by a US/UK flag icon in a language screen.

> Maybe im supposed to pick the american flag, but eww feel like a traitor and i want the u's in my words.

The purpose of a language selection screen is not to stroke your ego?

mikedelfino

Google Translator lists languages' names, and the list is pretty reasonable. I'm confident that designers could make it work even on interfaces where the language is a more subtle option.

xdennis

> No, you can't use the full name, since some languages have very long names.

Yes, every language has a name and you can use that. If you prefer an imprecise flag over the actual name of the language then what you're saying is that you prefer style over substance. There's always space to show the language name.

closewith

Are you seriously arguing against the use of ideograms? User interfaces without them would be unusable.

zmgsabst

There’s really not.

I frequently travel in places where I don’t speak the primary language — and having to hunt down a menu in a language I can’t read sounds a lot worse than having a flag I know visible on the main page.

troad

Why did you use letters to send your reply? Letters are a symbolic representation of language, but they are imprecise. I don't know the prosody of your utterance, what tone you used, what accent you're speaking, etc. This is unacceptable and I am very offended. /s

Symbols are useful. You can quibble over the symbols chosen (they don't seem to do a lot of physical weighing in courts?), but that is fundamentally besides the point, which is 'how do I convey this widely understood concept in a limited amount of space?'.

braiamp

The browser or the host system usually informs you about the language. Apple and Google solved the rest by using geofence data. If you have a menu/screen to select the language, you can write as much as you want and have overflow for the long list. Order them by current language based on collation, and done. People want "language" to be too accessible when it doesn't need to be. Also, see amazon.

Alex-Programs

I develop a language learning tool that uses flags for languages extensively.

I know that they have flaws. The problem is, there isn't any better pictorial representation, and they work well enough that it's better than not having one.

For some languages they work very well (e.g. Swedish), for others there may technically be ambiguity but it's clear enough (e.g. the Union Jack for English), and some are more difficult and rely on convention (e.g. the Egyptian flag for Arabic).

The landing page (https://nuenki.app) has a cloud of flags of the supported languages. It's an information dense, easy to scan way of seeing whether your language is supported. Sure, it's not technically 100% accurate, but what's the alternative?

bdhcuidbebe

Flags for languages dont even work with one of the largest countries, India. They have about 20 official languages that var greatly.

Then of course the multitude of languages spoken in many european languages such as Spain (catalan, gallician, basque). Or the latin american variation.

Or what about Switzerland who dont have their own language (they speak french, german, italian and romanch).

Even your example of Sweden is naive, as we have Swedish, Finnish, Sapmi, Meänkieli and I would argue Älvdalska is another proper language too, even if it dont have official status.

Its a very flawed idea and no matter how pretty it may look, it cant map to reality and is just misleading at best.

Alex-Programs

India is definitely a difficult one. I'm using it to represent Hindi, and that's the one that makes me the most uncomfortable, because there are so many languages. I think the intent is reasonably clear, but if all countries were that ambigious, I'd avoid flags.

Nuenki supports European Spanish (though now you mention it, I ought to make that clearer). If it were American Spanish, I'd probably use Mexico. I handle Portuguese that way.

Switzerland is easy, because I have no need to include their flag. German is covered by Germany (yes, I know of Austria), French by France, etc.

And I'm highly unlikely to add Romansh, if only because it'd be very difficult to translate with good quality. I would if I could though, I find it fascinating. For a flag, I'd find an online Romansh community and ask what flag people would find most respectful + representative, or if people would prefer I forgo it.

You argue that it's misleading. I see where you're coming from. It isn't perfectly explicit and unambiguous. However, I don't think it's misleading in practice.

Nobody looks at a Spanish flag and thinks it's denoting Catalan - I'd probably use a regional flag there - nor do people look at a Union Jack or an American flag and go "no idea what that's for". When looking to see if Nuenki supports Finnish, nobody looks for the Swedish flag. They look for the Finnish flag.

People know what the stereotypical flags are, particularly when they're learning that language.

So imo it's about absolute precision vs UX, and the UX of reading through a textual list of languages is awful. It's a complete pain to scan through without any kind of visual indicator. That's why, in practice, everyone uses flags.

I didn't used to use flags so widely. Adding them everywhere (e.g. the dropdowns on the demo) was a result of feedback from people who felt it would make it nicer to use.

tyre

If someone see's the spanish flag on a language learning site, they're going to know it's spanish. No one looks at that and think, "hmm, no, I don't want to learn basque."

It may be technically correct, but it's pretty obvious to people what it means. It's extremely common.

crazygringo

> Flags for languages dont even work with one of the largest countries, India. They have about 20 official languages that var greatly.

Curious, do Indian websites just never use flags then?

Or do they use flags for the states within India?

Because at a quick glance, it seems like there is a general mapping of languages to one or more states:

https://en.wikipedia.org/wiki/Languages_of_India

https://en.wikipedia.org/wiki/States_and_union_territories_o...

Very similar to the world situation.

rrr_oh_man

Give me one example of a website that supports, let's say, three of the 20+ Indian languages, Catalan, Galician, Basque, Swiss French, Swiss German, Swiss Italian, and Romansh.

You will have a hard time, even on Wikipedia.

For most people, flags absolutely are the best shorthand for the language of the same name.

ludwik

I don't think anybody claims that it is not a flawed idea. From what I understand from this thread, people who use flags to represent languages fully acknowledge that it is a flawed idea - the problem is that they lack an alternative solution in some contexts (for example, those that require high information density).

cco

In your experience, what's the better option for an iconographic representation?

hiccuphippo

Should there be emojis to represent languages? Maybe it could be a new group. I'd rather not use the flag shape, maybe a circle with the 2 letter code and a background with the colors from the flag usually used to represent that language, mainly because people is already used to scan the lists looking for those colors.

david_allison

IshKebab

Doesn't really make a great case. I obviously recognise both the union jack and American flag as "English", and nobody would expect it to mean Welsh. Also there are approximately no people that speak Welsh and not English.

It's one of those "yes technically you're right, but actually it still works really well in practice so sod off" things. It's like saying tomatoes should be in the fruit aisle. No thanks. Sometimes utility is more important than anal correctness.

adzm

On the other hand, this is very helpful when things are already in a language you don't understand.

rrr_oh_man

> I feel obliged to point out that flags do not represent languages

Says who?

Probably not the actual users of websites, I'd wager.

slater

Say people from countries with multiple languages.

E.g., Switzerland has four official languages, none of which are English.

Also, UX/UI designers have rightfully been banging the "don't use country flags to indicate languages" drum for literally decades, now. We dealt with this issue in the 90s.

crazygringo

> E.g., Switzerland has four official languages, none of which are English.

Switzerland seems pretty easy -- French, German and Italian get the obvious flags, while Romansh gets either the Swiss flag or the Grisons flag. No?

> Also, UX/UI designers have rightfully been banging the "don't use country flags to indicate languages" drum for literally decades, now. We dealt with this issue in the 90s.

So it kind of seems to me like they've lost. They might be banging the drum, but in the real world the flags are useful.

rrr_oh_man

That's fine for Switzerland. And I get the India case.

But why does it have to concern some Finnish online store that also has English and Swedish as options? Do their actual users really care? Because that is the litmus test, not the opinion of someone writing a blog.

torstenvl

Are you claiming French- or German-speaking Swiss users don't know that they speak French or German?

Or are you claiming that they don't know what the French or German flags look like?

crazygringo

But as long as languages don't have any symbol, and symbols help with recognition, is it maybe just a lesser of evils?

It's clear that English originates from the UK and Portuguese originates from Portugal. Not to mention that sites often do have country variants -- the Brazilian Portuguese gets the Brazilian flag. And if a site is only for US and Mexican customers, a US flag makes sense rather than UK because it'll also use US currency.

And a flag icon also helps your eye quickly find the localization drop-down mixed in with a bunch of other stuff in the footer.

hunter2_

> My approach was to draw an American flag emoji and then look at the pixels to see if any of them contained a non-grayscale color. This works because the Windows fallback emoji is just black/white text

This is the kind of thing that works great for a while, and then an OS update flips the table on how RGB subpixel antialiasing works for the subset of your users with a certain type of display, leading to a false positive all of a sudden.

Chrome could at least expose support like other feature detection APIs, even if they don't go so far as to provide the flags, to avoid this ridiculous heuristic approach.

Aside: my personal belief is that the political charge here lies with Unicode having codepoints for such countries, and downstream dependents of Unicode can readily point the finger. Displaying monochrome text of a country abbreviation instead of a flag doesn't seem like it would appease those who don't want the country acknowledged, anyhow; a "missing glyph" type of thing would come closer.

null

[deleted]

scrollaway

Unicode doesn’t have codepoints for any of these. Unicode has defined a singular generic way to transform iso country codes (not even — just two of any characters), and says it’s how you do flags.

josephcsible

I don't get why Google doesn't want to ship them with Chrome, since they're not taking any more of a political stance by doing so than they are by shipping them with Android.

psychoslave

The main issue I have with these flags is that they are more often than not used to indicate language, not country. But many countries have more than one official language and many languages are official language of more than one country.

Not many languages have some official flags though. There is one for Esperanto and Francophonie for example. But while anyone speaking Esperanto will certainly recognize the green flag, it's more dubious that most users would recognize the flag of the OIF.

https://commons.wikimedia.org/wiki/File:Flag_of_Esperanto.sv...

https://isolatedtraveller.com/flag-of-organisation-internati...

kccqzy

> My approach was to draw an American flag emoji and then look at the pixels to see if any of them contained a non-grayscale color. This works because the Windows fallback emoji is just black/white text

Wait. I thought Windows has ClearType which could render black text on white background using colors. And furthermore there is a wizard to allow users to adjust how much ClearType adjustment there is. This feels like a totally incorrect solution.

And apparently starting from 2021 Microsoft Edge did in fact begin to use ClearText according to this article https://blogs.windows.com/msedgedev/2021/06/02/improving-fon... from Microsoft. So the author's approach would be broken in Microsoft Edge since 2021.

tobr

The polyfill mentioned and linked in the article has a cleverer solution. It attempts to render the same flag emoji in two different text colors and checks if they end up being the same color or not (same color = probably a color glyph, ie an emoji).

https://github.com/talkjs/country-flag-emoji-polyfill/blob/5...

MatmaRex

You're right, but the author's approach still works by accident, because ClearType is disabled when drawing text to canvas. I am not sure why that's the case, but I would guess it's because the subpixel colors can only be computed correctly when the background color is known (and static), and with a canvas, the background can be drawn later or animated. ClearType is only enabled for normal text on the page, and many CSS properties incidentally disable it presumably for similar reasons (e.g. 'will-change: opacity;').

Arbortheus

Dumb decision from Microsoft. Will they remove country borders from Bing Maps because they might be considered political too?

fweimer

They removed country borders from the time zone selection in a Windows 95 update: https://devblogs.microsoft.com/oldnewthing/20030822-00/?p=42...

In Bing Maps, I expect them change country borders based on localization settings, but that was probably too onerous to implement and test in the Windows 95 days.

LeoPanthera

I remember when this happened, which I guess makes me very old.

They didn't actually remove the map - they just removed any functionality it had. So the time set window is massive for no reason, it contains this huge world map bitmap that no longer does anything.

jey

You're not too far from the truth -- most mapping services render political boundaries differently based on where you're accessing the site from.

int_19h

Or just refuse to commit. E.g. Google Maps, to this day, will not show the country for any Crimean city when you click on it to bring up its info panel. If you do this with e.g. Kherson, you get "Kherson, Kherson Oblast, Ukraine". But if you do it with Sevastopol, you only get the city name, not the region & country. It also shows dotted borders between Crimea and both Russia and Ukraine.

andix

Isn’t Google Maps blocked in Russia anyway? Crimea is a different story, as many countries recognize it to be in some kind of limbo and treat it as neither Russian nor Ukrainian.

I think Yandex (Russian Google) removed borders completely from their maps. Also because it’s impossible to figure out where the Russian government would like them to be. Might change on a daily basis.

Google maps added the „gulf of America“ to their US version, because anywhere else it’s still the Gulf of Mexico (even in iOS autocorrect, it changed it correctly to uppercase).

IshKebab

Well... that kind of makes sense no? What do you think it should say?

strictnein

The Kashmir region north of New Delhi is an interesting example. Even in the US, Google basically says you're on your own, but here's a collection of dotted lines that may or may not be the actual borders.

andix

It’s the reality of doing business all around the world.

Either you chose sides, create different releases of software for some countries (deployment nightmare), or just remove such „sensitive“ features.

SpicyLemonZest

Basically any large platform that renders map data realizes pretty quickly that you have to adjust it country by country to accommodate everyone’s irredentist claims and naming disputes. I suppose there’s no reason they couldn’t ship different system fonts to different countries, but that introduces a lot of annoyance and room for error for a somewhat marginal use case.

Jotalea

> Out of desperation I asked ChatGPT. It was useless as usual.

This is so real.

sandruso

Yep, can confirm that emoji flags are evil. We had same problem. Windows users reported missing flags and few google searches away we found out that emoji flags are not supported.

xdennis

Personally I prefer rendering country codes over flags because it allows me to spot and scold anyone who uses the flag of Chad to represent Romania (they look pretty much the same as emojis).

fsckboy

yes, we know, there are historical territorial disputes all over the world. But can somebody here make a case that this is not actually/solely to appease China (over Taiwan presumably)?

mjr00

If the essence of your question is "are there US-aligned/non-China countries who would have issues about certain flags", the answer is yes. Good example: the flag for the Democratic People's Republic of Korea, aka North Korea. The Western world acknowledges North Korea as a separate entity. South Korea does not and considers the North part of its territory. They wouldn't be too happy about a NK flag on their operating system giving legitimacy to the state.

B-Con

Presumably this is a big company problem of playing politics safely: They didn't want to take a position on the N country disputes out there by deciding which country code gets which flag and furthermore don't want to acknowledge which country politics are even disputed and so don't support the rest.

paulgb

Microsoft has at least one maps product (Bing Maps), and at one time had an encyclopedia with an atlas. You’d think they’d have a way of dealing with disputed territory.

CamouflagedKiwi

I'm sure they do have a way of dealing with it in Bing Maps - I assume they can display borders differently depending on the country of origin (I think that's the common approach), but that has zero technological overlap with the presence or absence of Unicode flag codepoints in a system-level font.

aleph_minus_one

> They didn't want to take a position on the N country disputes out there by deciding which country code gets which flag

Why not simply collect all the prevalent "stances" on the disputed topics, and give the user to choose on each stance individually (or for a better user experience: create some presets of "stances that often occur together", which the user can use to activate multiple stances at once).

Alex-Programs

That'd be amusing. When you first install Windows, you get...

"Is the island to the east of mainland China (also known as Taiwan, or Chinese Taipei) part of the People's Republic of China?"

"What is the legal status of Gibraltar?"

"Who ought to have won the Cod Wars?"

And on, and on...

Alternatively, have your pick of

"Western (standard)"

"Western (tankie)"

"Chinese (the big one)"

"Chinese (the small, disputed one)"

"American (pro-Iceland)"

"American (pro-UK, for the purpose of the Cod Wars)"

"British (Still Irritated Over Suez)"

"British ('What's Suez?')"

Your idea is quite sensible, of course, but you could make it quite absurd if you liked. Perhaps I'll put something like this together one evening. I'm sure there are more silly disagreements to include than the ones I know of as a brit.

mschuster91

Some of the target countries have laws on the books with teeth regarding their individual disputes.

danjl

Does this problem disappear if you specify your own font for your site, like Roboto?

TonyTrapp

If the font contains the missing emojis, sure. Emoji fonts tend to be huge though. The base Roboto font doesn't contain the emojis IIRC, there's a separate Roboto Emoji font for this reason (it's several dozen MBs).

qingcharles

You can also do like a lot of major sites and just identify the codepoints and replace them with images as a kludge. I think Twitter does this since Elon thought the water gun emoji was too "woke".