Page MenuHomePhabricator

Language variants support for the responsive language selector
Open, MediumPublic

Description

As part of the work to support a responsive language selector (T287860) we want to provide support for language variants. In this way, users can select the language they want as well as the specific variant in cases where they are several.

What is presented as a variant depends on the context. For example, in Mediawiki variants such as "Canadian English" or "British English" are available when selecting the UI language. However, only "English" would be available in the interlanguage links on Wikipedia (since there is no separate "Canadian English" Wikipedia).

The language selector will provide the option to present certain options as a group. In this way, the application using the language selector will decide which languages are grouped together to present them as variants for the specific context.

LangSel-variants.png (390×816 px, 38 KB)

The general idea is to support variants in a way that:

  • Keeps the language selection simple.
  • Surfaces the variants and let's users select them easily, facilitating switching between variants.

This is achieved by signalling that a language option can be expanded to select a specific variant. In addition, the generic language label can be used to access the language using the previously selected variant. Finally, providing quick access to the other variants when the current language has variants available.

This allows to support several cases:

  • Users interested only in a particular variant, will be able to select their variant (e.g., "Australian English") the first time, and the next time switching from other language into "English" the "Australian" variant will be selected (i.e., no need to repeat the variant choice).
  • Users switching between variants will benefit from having quick access to all the variants of the selected language.

Variants Overview.png (768×1 px, 83 KB)

Overview Copy 7.png (768×1 px, 77 KB)


This approach was documented as part of the language selector component designs.

Related ticket: T278372: Support for language variants and multiple scripts