4 ms·
<input type=“country” />
- tyingq 9y agoI have my doubts as to whether a generic solution solves this. The author notes some issues, like using it for place of birth. Now you need a temporal list for "countries that existed in year XYZ". There are similar issues for shipping. Not everyone ships everywhere. If the list is abstract and unknown to me, how do I whitelist/blacklist? Am I supposed to know that Scotland exists in the list or not? What if it's for a passport input? Does Scotland have it's own passport? How do I deal with Taiwan without pissing off Chinese web site visitors? Tldr: The list depends on context. I'm skeptical that a centralized list could deal with commonly used contexts.
- syncordie 9y agoAn input list of all current passport issuing countries would be useful. The Scotland problem doesn't arise as they don't issue passports (the UK does).
- baq 9y agowhat about taiwan? what about taiwan if you're in china...?
- raker 9y agoMy thoughts exactly. This means Google would be determining whether Taiwan is an independent country or not, making either China, or more probably Taiwan unhappy. Something besides the browser would need to determine what your list of countries is, like the site itself... but a solution like that is much less elegant. Chrome having regional behavior also just sounds like more mess for devs. Some sites will deliberately want to pick sides, and should be able to. Geographic data will have to come from somewhere, to add countries to this list that "don't exist" in whatever the built-in list of country options is.
- tyingq 9y agoI believe Palestine has a similar issue. They have passports, but few countries recognize them.
- syncordie 9y agoAccording to https://en.wikipedia.org/wiki/Taiwan_passport https://en.wikipedia.org/wiki/Taiwan_passport , the issuing country code is: TWN, the ISO country code for Republic of China, listed as "Taiwan, Province of China" in ISO 3166-1
- dagw 9y agoAnd then someone tries to use it for an app where you have to select which national football you play for.
- davb 9y agoOr anything involving legal system/jurisdiction or company registration (both of which are differ between countries within the UK). The UK and the Netherlands are both (according to ISO 3166-2 [0]) countries which contain other countries. [0] https://en.wikipedia.org/wiki/ISO_3166-2 https://en.wikipedia.org/wiki/ISO_3166-2
- crote 9y agoIn the case of The Netherlands, this is plain wrong. The Kingdom of the Netherlands contains four countries, being The Netherlands, Aruba, Curaçao, and Sint Maarten. According to ISO 3166-2, there exists a country "The Netherlands" which contains the other three. Close, but not correct.
- Uehreka 9y agoSealand issues passports, but they are not recognized by any other country.
- msla 9y agoIsrael issues passports, but people holding an Israeli passport also hold some other country's passport if they want to travel to any other country in the MENA region. Also, recognizing Israel as a country will lead to the most interesting discussions in your software's support fora.
- shalmanese 9y agoBehind every standards dispute is a solution that is simple, elegant and wrong.
- Touche 9y agoSomeone on twitter suggested using the OS' own list of countries, working around the problem of the standard having to define what is/isn't a country. I think that's a reasonable solution.
- WorldMaker 9y agoWindows dropped having a list of countries in the 9x era because there were too many international issues and disputes. It's also why they dropped even trying to draw the shapes of time zones because that too was causing international border complaints.
- WorldMaker 9y agoFor shipping too, not just that every shipper ships to every country, but that shippers ship to different countries unequally: costs associated change or they only ship below certain weights or they require three dozen more customs forms to be signed (each in triplicate). Many of the shippers have rather complex APIs for that (give me the country list and shipping cost for this assumed package weight range), how would you try to replicate that in the browser?
- jlebrech 9y agonow tie that to a SaaS that helps you manage those countries
- johansch 9y agoI'm mostly just impressed that HN allows brackets in the title...
- colanderman 9y agoThough somehow the submitter replaced the ASCII double-quotes (") in the original title with paired Unicode quotes (“ and ”). Notably the modified title is not valid XML. I wonder if that was necessary to get it past some filter?
- jacobr 9y agoI had to edit and replace them with HTML entities, at first they were just stripped.
- johansch 9y agoOkay, now I'm less impressed :).
- richardknop 9y agoHow do you define a country? Is it what current western world considers a country? Meaning whatever US and EU allies (puppets) + Japan decide? Definition of a country is very flexible thing and depends on current political order. I.e. is Tibet a country?
- wlesieutre 9y agoAnd what do you do when China shows up and says "We're blocking your download servers unless you take Taiwan out of the `country` input"? Better to not centralize the failure points that political actors can put pressure on for what gets to be a country or not.
- colanderman 9y agoWouldn't that be a choice of the browser implementation, likely derived from the locale not unlike time zones?
- petepete 9y agoWell, it's not like Google and Apple haven't bowed to China's requests before.
- Y_Y 9y ago> A puppet state is a metaphor of a state that is supposedly independent but is in fact dependent upon an outside power. It is nominally sovereign but effectively controlled by a foreign or otherwise alien power, for reasons such as financial interests. Please tell us which European countries are US puppets.
- richardknop 9y agoGermany (still occupied by US army today), UK. Most of Eastern Europe.
- msla 9y ago
- donatj 9y agoJust do longitude and latitude. Show a map of the earth and let them drop a pin. There is no reasonable way to get the world to agree on a single list. I doubt you could get browser developers to agree on a single list. For example Apple listing Taiwan in Safari could get Apple kicked out of mainland China. There is simply too much politics here to be tenable.
- colanderman 9y agoHow do you propose visually impaired users use that interface?
- adtac 9y agoI know what we should do! A dropdown with every possible latitude and longitude combination.
- toxican 9y agoI think we can do better. You know those comically bad volume sliders that were all the rage on reddit earlier this year? Let's apply that to entire list of long/lats!
- pavel_lishin 9y agoWhat sort of precision are we talking about, here? If an input is interested in my place of birth, a precision of a square kilometer is typically sufficient. But if someone's asking me where I would like my stuff shipped, I would require a minimum of a square meter.
- marcosdumay 9y ago> But if someone's asking me where I would like my stuff shipped, I would require a minimum of a square meter. Well, don't forget an altitude combo, since apartments exist :)
- maxxxxx 9y agoI wonder how many people could find a country on a world map and drop a pin. I bet it's not too many.
- Already__Taken 9y agoClassic simple problem that's impossible to solve. The thought that web browsers support could solve this problem speaks volumes about the kind of rate people _think_ software gets updated. You could never trust input=country to be supported much less up to date thus it will always be poly filled by some library. So why the false hope?
- baq 9y agothis would have to be supported on the network level, something like DNS with temporal querying for 'i was born in yugoslavia' type of forms.
- heavenlyblue 9y agoBut by the time this happens - there's a huge probability our browsers will no longer be rendering any HTML.
- baq 9y agotimezones are a similar topic in the context of managing them, except there's less politics involved. i don't see how a global solution would look like, but i'm sure china will want a different list than russia and the US will want a different list from both of them, and that's only 3 countries out of 199 or 249 or however many are there at the moment (and then the temporal aspect comes into play.)
- masklinn 9y agoTimezones are downright trivial compared to this one, even if the heads-up can be very limited there's a central well-maintained database of them, and they have fairly low context-dependence: some historical context (timezones can "move around") and the socio-political context is limited to changes to timezones.
- DeusExMachina 9y agoOne paragraph into the article: > while also marvelling at the witless mansplainers Yeah, let’s make every discussion about gender, shall we? How about no?
- dreta 9y agoI read that, stopped caring, and closed the tab.
- deleted 9y ago[deleted]
- Wintamute 9y agoStopped reading at "mansplainers".
- deleted 9y ago[deleted]
- keymone 9y agoi didn't but now that you've pointed it out i'm annoyed.
- MBCook 9y agoHow does this contribute to the discussion?
- always_good 9y agoIt was said in the original article, so I'd ask how that quip contributes to their own point beyond inviting this exact conversation. It's a very socially charged statement. Do you also expect people to overlook a quip about gun control laws while explaining how monads work in Haskell, or is that conversation off the table because you embedded it inside another topic?
- MBCook 9y agoI honestly don’t think the writer was trying to ‘invite this discussion’, she made an offhand comment about her experience. I think people are seizing this as an opportunity to talk about their pet peeve. The comment doesn’t add to the discussion about whether a country field would be useful or how it could be implemented at all. But anyway did you read the twitter thread? The writer proposed standardizing a common function so everyone wouldn’t have to roll their own. A number of guys responded with ‘here’s how to roll your own’ as if she wasn’t intelligent enough to do that herself (and completely missing the point of the tweet). Do you have a better word for that behavior? It wasn’t an offhand quip like your gun control example, it directly related to the tweet she was talking about. And yes, I would think most people could read an article without freaking out that the two words ‘gun control’ were in there if they were off topic. It seems sad to me that seeing one word in an article is enough to derail the entire conversation because some people don’t like it. It’s not like it was a call to violence or something like that.
- darkhorn 9y agoThere is web component for that https://www.webcomponents.org/element/Protoss78/country-select https://www.webcomponents.org/element/Protoss78/country-sele...
- seszett 9y agoIt's yet another tangent in this topic, but there's something that bothers me here, and in many things that try to handle multiple languages. There are 47 lists of countries in French (that's just an example, I guess English and Spanish have as many of those) in the project that provides them [0], including half a dozen or so just for different regions of France. As far as I can see, almost of them are exactly identical except for the Canadian one (which has "Saint-Vincent-et-les Grenadines" instead of "Saint-Vincent-et-les-Grenadines" among other things). For English, en_US and en_UK have differences as meaningful as "Wallis and Futuna" vs. "Wallis & Futuna". Arabic has 28 different versions, all strictly identical. English, French, Spanish and Arabic "version" alone make up 33% of all content in the repo. What purpose does this serve? Who maintains these largely meaningless lists? Who chooses which languages make it to the list, and which regions do? I'm as puzzled by that as I am by the choices people make about what countries make it to their list of countries in select lists. [0] https://github.com/umpirsky/country-list https://github.com/umpirsky/country-list
- rplnt 9y agoRegarding the place of birth issue, I have never used the country I was born with when some form asked for birthplace. Always used the present state, i.e. in what country is the place I was born at. Is that not common? Would you expect someone to write down GDR, USSR, or even Constantinople? Or is it again the same issue that people want to use what they like?
- ubertaco 9y agoOne use-case I can see where this would come up: ancestry/genealogy websites. Someone's grandparents may have been born in the Soviet Union, not in the modern Ukraine, from a cultural-historical standpoint.
- petepete 9y agoThere was an excellent article[0] in Smashing Magazine several years ago that dealt with some of the complexities of country selectors. For someone who lives in the UK, you never know whether a list will have United Kingdom, Great Britain or England in it (I've come across all three), and similar problems exist for countries that are known by more than one name (eg Netherlands vs Holland). And some sites break sorting by pushing certain countries to the top of the list and breaking sorting completely. There isn't a completely right answer, a standardised country selector might work in some (most) circumstances for most people, but what if my list needs Czechoslovakia or Zaïre? Then, a "simple" problem becomes much, much, much more complex. [0] https://www.smashingmagazine.com/2011/11/redesigning-the-country-selector/ https://www.smashingmagazine.com/2011/11/redesigning-the-cou...
- snomad 9y agoNice idea, but she outlined more than enough reasons not to do it. Political (Israel-Palestine, China-Taiwan, Ukraine, etc). In my limited experience with automating international shipping I seem to recall UPS treats Guam, Puerto Rico, and US Virgin islands as countries (and our local CRM treated them as states). There are so many controls that HTML is missing - date pickers, menus, menu flyouts etc.
- vlucas 9y agoGood discussion, and it is certainly very nuanced. The trouble of the developer having to create this list themselves is the reason I made http://devdata.io http://devdata.io - so you could at least have an easy starting point for all this data that is basically just copy/paste.
- _rolf 9y agoThis post looks funny in the Digg RSS reader: https://i.imgur.com/TNASB3p.png https://i.imgur.com/TNASB3p.png