
Your browser speaks 200+ languages.
Let's say you're building a chat app. International. You're launching in Germany, Japan, and Brazil next quarter — because apparently that's the plan now, and you found out on a Tuesday afternoon. You have a timestamp. A user was online 5 hours ago. You want to show that. Simple. In English: "5 hours ago" In German: "vor 5 Stunden" In Japanese: "5時間前" In Brazilian Portuguese: "há 5 horas" Or maybe you have an event. It's in two days. You want to say that. In English: "in 2 days" In Arabic: "خلال يومين" In Turkish: "2 gün içinde" Or just a date. March 25, 2026. Simple. In English: "Mar 25, 2026" In Russian: "25 мар. 2026 г." In Chinese: "2026年3月25日" None of this is hard to display. It's hard to display correctly, in the right language, without shipping a dictionary to every user. The obvious solution that isn't great You open dayjs. You find the locale system. You import German. Portugal... and over and over more. import ' dayjs/locale/de ' import ' dayjs/locale/ja ' import ' dayjs/loca
Continue reading on Dev.to Webdev
Opens in a new tab


