我们应该对国家/地区列表进行排序吗?

发布于 2024-07-27 19:28:36 字数 289 浏览 2 评论 0原文

我刚刚从 Wikipedia ISO 3166-1 写了一个国家/地区列表

我的目标是在我的 xhtml 中的 select 中使用它,但它是一个巨大的列表。 你们中有多少人来自阿鲁巴岛? 但你们中有多少人来自英国、法国甚至美利坚合众国呢?

有时,我可以看到最常见的国家/地区列在列表顶部。

这是一个好的做法吗? 为什么以及为什么不呢?

I just wrote a list of country from the Wikipedia ISO 3166-1

My goal is to use it in select inside my xhtml, but it's a huge list. How many are you from Aruba? But how many are you from United Kingdom, France, or even United States of America?

Sometimes, I can see that the most common countries are listed at the top of the list.

Is it a good practice? Why and why not?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

演多会厌 2024-08-03 19:28:36

这是一个网络应用程序。 我不确定是否有网站这样做,但您可以按字母顺序对列表进行排序,并使用 IP 地理定位来猜测一个国家/地区作为默认设置。 它不会 100% 正确,但它可能会让您正确的人更容易填写表格......

This is a web application. I'm not sure if any sites do it, but you could sort the list alphabetically, and use IP Geolocation to guess a country to put as the default. It won't be right 100% of the time, but it might make filling out the form easier for the people you do get right...

一桥轻雨一伞开 2024-08-03 19:28:36

我见过这样的做法,其中前 3-5 个国家/地区(按数量)重复出现在列表顶部...然后显示一个中断,所有国家/地区然后按字母顺序列出。 显然,这仅对您的某些用户有帮助,但如果您知道其中 90% 来自排名前 (3-5) 的国家/地区...这可能会有所帮助。

例如

<select>
  <optgroup label="Quick Picks">
    <option>Australia</option>
    <option>Canada</option>
    <option>Germany</option>
    <option>United Kingdom</option>
    <option>United States</option>
  </optgroup>
  <optgroup label="All Countries">
    <option>A....</option>
    <option>A....</option>
    <option>A....</option>
    <option>B....</option>
    <option>B....</option>
    <option>C....</option>
    <option>C....</option>
    ...
  </optgroup>
</select>

删除了无效的 ImageShack 链接

注意:“按流量”我的意思是按您的特定网站/应用程序的流量。

I've seen this done where the top 3-5 countries (by volume) are duplicated at the top of the list... then a break is displayed and all countries are then listed in alphabetical order. This obviously only helps a certain set of your users but if you know that 90% of them come from within the top (3-5) countries... this might be helpful.

e.g.

<select>
  <optgroup label="Quick Picks">
    <option>Australia</option>
    <option>Canada</option>
    <option>Germany</option>
    <option>United Kingdom</option>
    <option>United States</option>
  </optgroup>
  <optgroup label="All Countries">
    <option>A....</option>
    <option>A....</option>
    <option>A....</option>
    <option>B....</option>
    <option>B....</option>
    <option>C....</option>
    <option>C....</option>
    ...
  </optgroup>
</select>

e.g. removed dead ImageShack link

Note: "by volume" I mean by volume of traffic to your particular site/application.

黒涩兲箜 2024-08-03 19:28:36

想想你的普通网络用户......对于某人(不知道他们可以只输入自己国家的第一个字母并以这种方式快速找到它)来说,在按字母顺序排序的列表中找到他的国家比在任意排序的列表中更容易基于网络人口。

我建议坚持按字母顺序排序。

Think of your common web user... It's easier for someone (who doesn't know they can just type the first letter of their country and find it fast that way) to find his country in an alphabetically sorted list then a list sorted arbitrarily based on web population.

I recommend sticking to alphabetical sorting.

心如狂蝶 2024-08-03 19:28:36

按字母顺序列出它们,并在顶部复制您的主要市场。

不要只是将它们移到顶部 - 我已经浪费了太多时间在下拉菜单中的“U”下寻找英国。

List them alphabetically, and duplicate your primary markets at the top.

Don't just move them to the top - I've wasted too much time looking for the United Kingdom under "U" in drop down menus for that.

薆情海 2024-08-03 19:28:36

为什么:出于您提到的确切原因; 如果您预计大多数/所有用户都是一个国家/地区,那么首先列出该国家/地区将有助于改善用户体验。

为什么不呢:每个不在人口最多的国家的人都可能想知道为什么这些国家被列在第一位(几乎就像一种特权形式)。 但如果您不想担心,则不必担心。 另外,用户仍然可以开始输入自己的国家/地区,并以这种方式找到它,所以这可能不是什么大问题。

可能还有解决方案来确定用户坐在哪里,但我不确定。 如果有的话,那可能是世界上最好的。

Why: For the exact reason you mentioned; if you expect most/all of your users to be one country, listing it first will help the user experience.

Why not: Every one not in the most populous countries may wonder why those countries were listed first (almost like a form of privilege). But if you don't want to worry about that you do not have to. Plus, users can still start typing their country in, and locate it that way, so this may not be a big deal.

There may also be solutions to figure out where the user is sitting, but I'm not sure about that. If there are, that may be the best of all worlds.

一场信仰旅途 2024-08-03 19:28:36

我的意见是坚持字母顺序; 我相信几乎每个人在打开下拉菜单时都会开始输入自己国家/地区的第一个字母。 :-)

My opinion is to stick to alphabetic order; I believe almost everyone starts typing the first letters of their country as they open the drop down. :-)

总攻大人 2024-08-03 19:28:36

根据您的目标受众,它可以是方便的,也可以是令人反感的。 我知道我个人认为这种做法有点侮辱性。 此外,它在某种程度上破坏了通过键入前几个字母来快速选择项目的能力 - 当每个人都以相同的方式对其进行排序时,当您键入相同的内容时,您会得到相同的结果。 但如果你把一些国家放在首位(不同的人为不同的国家做这件事),那么结果可能会不同。

Depending on your target audience, it can be either convenient or offensive. I know that I personally find the practice mildly insulting. In addition, it somewhat breaks the ability to quickly select items by typing the first few letters - when everyone sorts it the same way, when you type the same thing, you get the same result. But if you put some countries on the top (and different people do it for different countries), then results may be different.

瞳孔里扚悲伤 2024-08-03 19:28:36

按字母顺序列出它们。 即使是我们美国人也应该明白这一点。

不过,我确实建议您考虑一些更奇特的东西,例如带有自动建议列表的文本框。 对于那些喜欢浏览列表的人,您可以在侧面添加一个下拉箭头,尽管我怀疑他们中的许多人会使用键盘至少到达他们正在寻找的国家/地区附近)。

顺便说一句,我想你有英语国家的列表吗?

List them alphabetically. Even us Americans ought to understand that.

However, I do recommend you consider something a bit fancier, like a text box with an auto-suggest list. You could add a dropdown arrow at the side for those who like to scan through lists, though I suspect that many of them will use the keyboard to at least get to the vicinity of the country they're looking for).

OBTW, I presume you got the English-language list of countries?

狼性发作 2024-08-03 19:28:36

我同意按字母顺序排列是最普遍理解的机制。 自定义排序很可能会导致一些用户感到困惑。

该应用程序是否会本地化为其他语言? 请务必考虑到列表应根据用户语言按字母顺序排序。

I'd agree that alphabelically is the most universally understood mechanism. Custom sorting will most likely cause some users confusion.

Will the application be localized in other languages? Make sure to take into account that the list should be alphabetically sorted based on the users languages.

冬天的雪花 2024-08-03 19:28:36

您可以按字母顺序显示完整列表,并将您希望更多用户来自的国家/地区设置为默认选择的选项。

You can show the full list in alphabetical order and set the country that you expect more users to be from as the option selected by default.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文