Skip to content

Native country and language selects in HTML #818

@WebWeWantBot

Description

@WebWeWantBot

title: Native country and language selects in HTML
date: 2026-02-12T14:58:46.445Z
submitter: crissov
number: 698deaa618300277b6b5b9cd
tags: [ ]
discussion: https://github.com/WebWeWant/webwewant.fyi/discussions/
status: [ discussing || in-progress || complete ]
related:

  • title:
    url:
    type: [ article || explainer || draft || spec || note || discussion ]

ISO 3166 (for countries) and ISO 639 (for languages) are widely used international standards in information exchange. In websites, users are also often asked to select a country or language, but each author has to supply and maintain the list of acceptable values individually. Although projects like Unicode CLDR provide translations for these items (which may inform sort order), authors have to include those themselves as well.

I wish that <select> (or perhaps <input>) elements had a special mode for selecting a country or a language, which authors could trigger with an attribute value.

However, authors would also need to be able to either specify all valid values explicitly or implicitly by specifying just additions and exclusions from the default set. In both cases, they should not need to provide more than the usual two- or three-letter codes. This could look similar to <input list=…> with <datalist>.

<input type=country
  except=excluded-countries
  extend=additional-countries
>
<datalist id=excluded-countries>
  <option value=ru></option >
<datalist>
<datalist id=additional-countries>
  <option value=eu></option >
<datalist>

<datalist id=supported-languages>
  <option value=en></option >
  <option value=en-US></option >
  <option value=es></option >
  <option value=pt-BR></option >
<datalist>

If posted, this will appear at https://webwewant.fyi/wants/698deaa618300277b6b5b9cd/

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage-neededwantIncoming requests from the community

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions