i18n con next-intl: raíz multilenguaje (es por defecto, /en) + textos externalizados

- next-intl 4 (compatible Next 16): routing (es default en RAÍZ sin prefijo, en con
  /en, localePrefix 'as-needed'), middleware, request config, navigation helpers.
- Estructura app/[locale]/ (layout con <html lang>, NextIntlClientProvider, metadata
  SEO por idioma vía generateMetadata; page home con getTranslations).
- Catálogos messages/es.json y en.json: TODOS los textos de la UI (nada hardcodeado
  en los .tsx, se usan con t()).

Verificado: / -> español (lang=es, título ES), /en -> inglés (lang=en, título EN),
datos SSR desde MySQL. Añadir idioma = locale en routing + messages/<loc>.json.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-12 22:31:27 +00:00
parent c36b543184
commit 032bd0020b
12 changed files with 816 additions and 52 deletions
+1
View File
@@ -11,6 +11,7 @@
"dependencies": {
"mysql2": "^3.22.6",
"next": "16.2.10",
"next-intl": "^4.13.2",
"react": "19.2.4",
"react-dom": "19.2.4"
},