Imagine you build a website that only shows text in English. What problem might users from other countries face?
Think about users who speak different languages than English.
Internationalization helps users from different language backgrounds understand your website by showing content in their language.
In Next.js, if you set up i18n but forget to add translations for a language, what will the user see?
Think about how apps handle missing translations gracefully.
Next.js shows fallback content in the default language if translations are missing, so the app doesn’t break.
Choose the correct i18n configuration snippet for Next.js that supports English (default) and Spanish.
Check the exact property names Next.js expects for i18n.
Next.js expects locales and defaultLocale keys to define supported languages and default language.
Given a Next.js app with English and Spanish translations for a greeting, what will the user see after switching locale from English to Spanish?
const translations = { en: 'Hello', es: 'Hola' };Think about what happens when you change the language setting.
Switching locale updates the displayed text to the selected language’s translation.
Look at this Next.js config snippet:
module.exports = { i18n: { locales: ['en', 'es'], defaultLocale: 'en' } }Spanish pages return 404 errors. What is the likely cause?
Check if translation files exist for all locales.
Missing or incorrectly named translation files for Spanish cause Next.js to fail loading those pages, resulting in 404 errors.