Fundamentos
Next.js El futuro del Desarrollo Web
Novedades de Next.js 15
Migraci贸n de una APP a Next.js 15
Haciendo tu proyecto m谩s r谩pido
RSC: Refactorizando un componente cliente a servidor
C贸mo usar React Server Components con PostgreSQL sin un ORM
Consumiendo datos de manera eficiente
Consumiendo datos desde el servidor en Next.js 15
Consumiendo datos desde el cliente con React Query en Next.js 15
Patrones de Dise帽o: paralelo, secuencial y preload en Next.js 15
Uso avanzado de Suspense con Streaming rendering en Next.js 15
Escalabilidad y personalizaci贸n
Internacionalizaci贸n avanzada: rutas dinamicas y middlewares
Internacionalizaci贸n avanzada: diccionario de traducciones
Autenticaci贸n: Middleware en Next.js para validar sesiones
Autenticaci贸n: Cookie sessions Next.js
Feature Flags LaunchDarkly en Next.js 15
Manejo de errores en React Server Components y Next.js
Manejo de errores y observavilidad: Integraci贸n con Sentry
Caracter铆sticas Adicionales y Herramientas
Sistemas de cach茅 en Next.js 15
Seguridad y buenas pr谩cticas con Next.js
Seguridad y buenas pr谩cticas: cookies, jwt y encriptaci贸n
Auditoria de performance en Next.js 15
Despliegue en Producci贸n con Vercel
Despliegue en Fly.io: Preparaci贸n de Base de Datos
Despliegue en Fly.io: Despliegar Next.js en nuestro propio servidor
Next.js 15 el futuro del Desarrollo Web
You don't have access to this class
Keep learning! Join and start boosting your career
Internationalization in web applications is crucial to ensure a smooth experience for users of different languages. Here we explore how to implement internationalization from scratch in Next.js, using middleware and native JavaScript, to redirect users according to their configured language without relying on external libraries.
request.nextUrl
object to parse the requested URL and make decisions such as redirects or blocks.(/i18n
in this case)./i18n/en
or /i18n/en
).Accept-Language
header, which browsers send indicating the user's preferred languages.negotiator
library and format.js
, you can:(es
, en
).(en
) in case there is no match.Ignore irrelevant paths:
/i18n
.Allow routes with configured language:
Redirect routes with no language configured:
Accept-Language
header.pathname
to include the language.Contributions 2
Questions 0
Want to see more contributions, questions and answers from the community?