Next.js · Middle · Question 31 of 75

How do you support multiple languages in the App Router?

Explanation

The App Router doesn't use the built-in i18n option from the Pages Router. Typically you create a dynamic [lang] segment, redirect the user in proxy based on the Accept-Language header and load dictionaries in server components (they don't end up in the bundle). Libraries like next-intl are often used.

Further reading

Problem with a question

Next.js · Middle · question 31

Test yourself

Take the Next.js · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz