Plantilla de proyecto·Pro
Next.js + Tailwind + i18n
Proyecto de Next.js 15 con next-intl y Tailwind CSS, y una página en inglés y español en /en y /es. El modo oscuro sigue al sistema. Necesita el entorno Linux con Node.js; el primer npm install descarga unos 400 MB.
Para instalarlo necesitas PocketCode Pro.
Si tienes PocketCode instalado en tu Android, esto abre la página en la app.
Vista previa
Ficheros
README.md
messages/en.json
messages/es.json
next.config.ts
package-lock.json
package.json
postcss.config.mjs
src/app/[locale]/layout.tsx
src/app/[locale]/page.tsx
src/app/globals.css
src/components/LocaleSwitcher.tsx
src/i18n/navigation.ts
src/i18n/request.ts
src/i18n/routing.ts
src/middleware.ts
tailwind.config.ts
tsconfig.jsonREADME.md
# Next.js 15 + Tailwind + next-intl A one-page site in English and Spanish, with routes per language (`/en`, `/es`), Tailwind CSS and dark mode that follows the system setting. ## Run it in PocketCode You need the app's Linux environment with Node.js 18.18 or newer (the Developer pack in Terminal › Linux includes Node.js and npm). 1. Open the terminal in this project's folder. 2. Install the dependencies (the first time downloads around 400 MB and needs internet): ```sh npm install ``` 3. Start the development server: ```sh npm run dev ``` 4. Open http://localhost:3000 in the phone's browser. It redirects to `/en` or `/es` depending on the browser language. Other commands: `npm run build` (production build), `npm start` (serve that build), `npm run typecheck`. ## Where things are | Path | What it does | |---|---| | `messages/en.json`, `messages/es.json` | The texts of each language | | `src/i18n/routing.ts` | The list of languages and the default one | | `src/i18n/request.ts` | Loads the messages of the current language | | `src/middleware.ts` | Picks the language on the first visit and redirects | | `src/app/[locale]/page.tsx` | The page | | `src/components/LocaleSwitcher.tsx` | The language selector | | `tailwind.config.ts` | Tailwind settings (`darkMode: 'media'`) | ## Add a language 1. Add its code to `locales` in `src/i18n/routing.ts`, for example `'fr'`.Esta vista previa está recortada. El contenido completo llega al instalarlo.
Cambios en la 1.0.0
Primera versión.