Menu

We price in 24 currencies, ship 111 pages that all say lang="en", and have never once read Accept-Language
📰

We price in 24 currencies, ship 111 pages that all say lang="en", and have never once read Accept-Language

DEV Community: nextjs·Daniel Pertu·8 days ago
#IAj78blM
#devtonextjs#devto#dev#language#currencies
Long article (1451 words) — no AI summary yet.
Reading 0:00
15s threshold

PubTrivia sells in 24 currencies and speaks one language. That combination produces a specific and slightly strange localisation posture, and I had never measured it, so here it is in numbers.

The short version: money is localised with real care, words are not localised at all, and the request header that exists to tell a server what language you want appears nowhere in the codebase.

Zero occurrences of Accept-Language

$ grep -rni "accept-language" --include= "*.ts" --include= "*.tsx" . | grep -v node_modules $

Enter fullscreen mode

Exit fullscreen mode

Nothing. Not in the proxy, not in a page, not in a test. The only request header that changes what you are served is the country header the edge attaches, which picks your currency. What language you asked for is not consulted, which is defensible because there is exactly one language to serve, but it means the decision is implicit rather than written down anywhere.

The HTML agrees with itself about this, at least.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.