4 ms·
Oddly enough it doesn't list countries where most people are likely to come from right at the top. That makes it ill designed still.
by gumballindie 3y ago
Oddly enough it doesn't list countries where most people are likely to come from right at the top. That makes it ill designed still.
- melx 3y agoThe OP wrote this is based on "navigator.languages" feature in the visitor's browser. So if your preferred language is set to e.g. French, then you shall see France at the top of dropdown.
- hk__2 3y ago> So if your preferred language is set to e.g. French, then you shall see France at the top of dropdown. If it’s French from France, yes. This is the second part of the language code: fr_FR is French from France, fr_BE from Belgium, fr_BF from Burkina Faso and so on.
- melx 3y agoGood point! But what... if it's French Belgian person from France... is this still "French from France", or "French from Belgium" ? The Belgian person lives in France ;-) Also, you missed other language codes for French: fr_BI, fr_BJ, fr_BL, fr_CA, fr_CD, fr_CF, fr_CG, fr_CH, fr_CI, fr_CM, fr_DJ, fr_DZ, fr_GA, fr_GF, fr_GN, fr_GP, fr_GQ, fr_HT, fr_KM, fr_LU, fr_MA, fr_MC, fr_MF, fr_MG, fr_ML, fr_MQ, fr_MR, fr_MU, fr_NC, fr_NE, fr_PF, fr_PM, fr_RE, fr_RW, fr_SC, fr_SN, fr_SY, fr_TD, fr_TG, fr_TN, fr_VU, fr_WF, fr_YT.
- nicbou 3y agoAs an official policy, I do not recognise the existence of Belgium. However I am Canadian and I speak French. It will recognise fr-CA as "Canada".
- hk__2 3y ago> But what... if it's French Belgian person from France... is this still "French from France", or "French from Belgium" ? The Belgian person lives in France ;-) This is accessory; the goal is to suggest relevant options for someone based on the language they configured their browser with. > Also, you missed other language codes for French: […] These are combinations of a language code (fr) and a region code; the list is not standardized and could theorically be extended to all the regions with an ISO code. What’s interesting here is the region code, not the language.
- martin_a 3y agoI think this has been taken care of: > I use navigator.languages to get a list of supported languages. For example, en-CA, fr-CA, de-DE. This gives me a list of countries the user might have lived in. I suggest those countries at the top of the country list.
- layer8 3y agoNot for people like me who always set their browser language to en-us (or just “en”) because they mostly peruse the internet in English.
- nicbou 3y agoThen you'll have to press one or two extra keys on your keyboard.
- lucb1e 3y agoYep, as a techie I don't see the problem either, but the person who started this subthread apparently minds that > Usually [you get] 194 other countries in a loooooong list (cue this website having precisely that list)