Recall & Review
beginner
What is the main purpose of the Next-intl library in a Next.js app?
Next-intl helps you add multiple languages to your Next.js app so users can see content in their own language easily.
Click to reveal answer
beginner
How do you wrap your Next.js app with Next-intl to provide translations?
You wrap your app with the <NextIntlProvider> component and pass the messages (translations) for the current language as a prop.
Click to reveal answer
beginner
Which hook from Next-intl do you use inside components to get translated text?
You use the useTranslations() hook to get a function that returns translated strings based on keys.
Click to reveal answer
intermediate
How do you load messages (translations) for different languages in Next-intl?
You create JSON files for each language with key-value pairs and load them in your app based on the current locale.
Click to reveal answer
beginner
What is the role of the 'locale' parameter in Next-intl integration?
The 'locale' tells Next-intl which language to use for translations and helps load the correct messages.
Click to reveal answer
Which component do you use to provide translations to your Next.js app with Next-intl?
✗ Incorrect
Next-intl uses to wrap your app and provide translation messages.
How do you get translated text inside a component using Next-intl?
✗ Incorrect
The hook useTranslations() returns a function to get translated strings by keys.
Where do you store your translation messages for different languages in Next-intl?
✗ Incorrect
Translation messages are stored in JSON files, one for each language.
What does the 'locale' value represent in Next-intl?
✗ Incorrect
'locale' is the language code that tells Next-intl which translations to use.
Which Next.js feature helps you detect the user's locale for Next-intl?
✗ Incorrect
You can detect locale using Next.js middleware or server-side functions to load correct messages.
Explain how to set up Next-intl in a Next.js app to support multiple languages.
Think about provider, messages, locale, and hooks.
You got /4 concepts.
Describe how you would organize translation files and use them in Next-intl.
Focus on file structure and loading mechanism.
You got /4 concepts.