Menu

Our site formats money in 24 locales and declares one language, and 14 of those locales are languages we have no words in
📰

Our site formats money in 24 locales and declares one language, and 14 of those locales are languages we have no words in

DEV Community: nextjs·Daniel Pertu·1 day ago
#3CggJDIj
#devtonextjs#devto#dev#pages#locale
Reading 0:00
15s threshold

Notifio is a desktop app that watches rental search pages and emails you when a new listing appears. The market for that is a person hunting for a room in Amsterdam, Berlin or Madrid, and the site reflects it: fifteen pages about specific rental portals, grouped into six regional sections on /alerts with headings reading Netherlands, United Kingdom, Europe and international, Germany, Spain and southern Europe, Marketplaces.

The site also charges each visitor in their own currency, which I have written about from the payments side in three of our 24 currencies are written without decimals and two of our pages tell the browser tab £20 and the visitor €24.99 .

What I had never done is look at the two halves together: what the site knows about the visitor's locale, against what it tells the browser about its own language.

The markup side of the census

38 pages fetched from the live site:

$ grep -o '<html[^>]*lang="[^"]*"' pages/*.html | grep -o 'lang="[^"]*"' | sort | uniq -c 38 lang = "en" $ grep -c…

Continue reading — create a free account

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