Show each language's flag in the language menu #52

Closed
opened 2026-09-06 15:46:48 +00:00 by tiagoagueda · 0 comments
Owner

Observation

exibit corresponding flag on the language dropmenu on language selection

Why

Twenty-four languages is a long list, and the eye finds a flag faster than it reads a name
— particularly a name written in a script the reader does not use.

What exists today

core/languages.py holds NATIVE_NAMES, and the picker shows the native name with a note
about the state of that translation. There is no image in the menu, and there is a reason:
img-src 'self' (config/settings/prod.py), so a flag cannot come from anybody else's
server, and a set of flag images is a hundred kilobytes of assets for decoration.

Shape

  • Regional indicator characters, not images. 🇫🇷 is two code points and no request at
    all. They render as flags on macOS, iOS, Android and most Linux desktops. Windows shows
    the two letters instead
    — a legible fallback rather than a broken image, and worth
    writing down before it is reported as a bug.
  • A language is not a country, so the mapping is made deliberately rather than derived
    from the code: en-GB → 🇬🇧 and pt-PT → 🇵🇹, but el → 🇬🇷, cs → 🇨🇿, ga → 🇮🇪. For
    the EU set every language has one obvious member state, which is what makes this
    tractable now — and it will need care when #43 moves past Europe, where Spanish is not
    only Spain and Arabic is not one flag.
  • One column in languages.py, shown in the picker and nowhere else, marked
    aria-hidden="true" because the name beside it already says what it is.

Classification

Enhancement, and a small one. Not breaking.

Depends on

Nothing. #53 needs the same mapping, so whichever lands first should put it where both can
read it.

Open questions

  1. What happens at the phases of #43 beyond Europe? Proposal: a flag where a language has
    one uncontested home, and nothing at all where it does not. No flag beats a wrong flag.
## Observation > exibit corresponding flag on the language dropmenu on language selection ## Why Twenty-four languages is a long list, and the eye finds a flag faster than it reads a name — particularly a name written in a script the reader does not use. ## What exists today `core/languages.py` holds `NATIVE_NAMES`, and the picker shows the native name with a note about the state of that translation. There is no image in the menu, and there is a reason: `img-src 'self'` (`config/settings/prod.py`), so a flag cannot come from anybody else's server, and a set of flag images is a hundred kilobytes of assets for decoration. ## Shape - **Regional indicator characters, not images.** `🇫🇷` is two code points and no request at all. They render as flags on macOS, iOS, Android and most Linux desktops. **Windows shows the two letters instead** — a legible fallback rather than a broken image, and worth writing down before it is reported as a bug. - **A language is not a country**, so the mapping is made deliberately rather than derived from the code: `en-GB` → 🇬🇧 and `pt-PT` → 🇵🇹, but `el` → 🇬🇷, `cs` → 🇨🇿, `ga` → 🇮🇪. For the EU set every language has one obvious member state, which is what makes this tractable now — and it will need care when #43 moves past Europe, where Spanish is not only Spain and Arabic is not one flag. - One column in `languages.py`, shown in the picker and nowhere else, marked `aria-hidden="true"` because the name beside it already says what it is. ## Classification Enhancement, and a small one. Not breaking. ## Depends on Nothing. #53 needs the same mapping, so whichever lands first should put it where both can read it. ## Open questions 1. What happens at the phases of #43 beyond Europe? Proposal: a flag where a language has one uncontested home, and nothing at all where it does not. No flag beats a wrong flag.
tiagoagueda added this to the 0.2.0 milestone 2026-09-06 15:46:48 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Postulo/postulo#52
No description provided.