journal ·

Why the language menu is a plain select

The language menu in the header is the ordinary select element that every browser already knows how to draw, and that was a deliberate choice.

Sixteen languages, sixteen addresses

This site is written in sixteen languages: English, Korean, Japanese, Simplified Chinese, Traditional Chinese, Spanish, Brazilian Portuguese, French, German, Indonesian, Thai, Vietnamese, Turkish, Russian, Arabic and Hindi. None of them is a layer on top of another. Each language has its own pages at its own address, so a page in Japanese is a real page that can be linked to, bookmarked and found by a search engine. The menu is only a way to move between those addresses, and each option points at the same page in another language.

Why not something fancier

A menu with flags, animated panels and a search field can look impressive, but it has to be built from scripts and styles that are loaded every time, and every custom piece is a place where something can break for somebody. A native select has no such problem. On a phone it opens the system picker, which is large, familiar and easy to use with a thumb. With a keyboard it opens and closes the way people expect. A screen reader announces it as a list of choices with the current one selected. Nobody had to design any of that, and nobody has to maintain it.

Names, not flags

The options are the names of the languages, each written in that language, so a person who reads only Thai can find Thai without understanding the word for language in any other. We left the flags out because a language is not a country, and many people read more than one language.

What it remembers

When you choose a language, the page saves your choice in your browser under one name, ipe_lang, and opens the matching page. The next time you arrive at the front door, the site looks at that saved choice first, then at the language your browser reports, and falls back to English if it has nothing else to go on. Your choice always wins over a guess. The choice never leaves your device.

Without scripts

If scripts are turned off, a select that changes the page by itself cannot work. For that case a short list of plain links is added next to it, one for each language. They are ordinary anchors, so they work in any browser, in a reader mode, and for any crawler that wants to see which languages exist. The page stays useful with nothing at all running.

ipe(); // be still

A small control that always works is worth more than a clever one that usually does. This one is small on purpose.

← all entries