Menu

How to translate a Next.js App Router app with next-intl (without doing it by hand)
📰

How to translate a Next.js App Router app with next-intl (without doing it by hand)

DEV Community: nextjs·Addongo Solutions·about 18 hours ago
#X4WgZi1E
#devtonextjs#devto#dev#next#every
Long article (823 words) — no AI summary yet.
Reading 0:00
15s threshold

Your Next.js app works, it has users, and every label is hard-coded in English. Someone asks for a French version. You open next-intl 's docs, and realise the setup takes an afternoon and the extraction takes a week.

This post shows both: what the setup looks like by hand, and how to get the same result with three commands.

1. Why hard-coded text gets expensive

Hard-coded strings are free until the second language. Then every <button>Save</button> , every toast.success("Saved") , every placeholder="Search" and every `${n} files` has to become a key, live in a JSON file, and be called through t() . The longer you wait, the more strings there are, and the more of them hide in places a quick search misses: metadata, validation messages, constants mapped into a <Select> , helper functions.

2.…

Continue reading — create a free account

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