This project template showcases an enhanced internationalization (i18n) experience in a Next.js application using the next-roots package. By generating all localized file-routes (slugs) in advance, this approach simplifies routing and improves performance compared to dynamic [lang]
segments.
- Simplified Routing: Automatically generates localized routes such as
/es/acerca
and/about
, allowing you to manage multiple languages efficiently. - Centralized Translation Files: Keep your code clean by defining routes in one file and placing translations in another, making it easier to maintain and scale your application.
-
Clone the repository:
git clone https://github.com/CarlosUlisesOchoa/nextjs-multipage-multilanguage-example.git
-
Navigate to the project directory:
cd nextjs-multipage-multilanguage-example
-
Install dependencies:
pnpm install
-
Run the development server:
pnpm dev
-
Open the application:
Visit http://localhost:3000 in your browser to see the app in action.
Pull requests and contributions are welcome. Please open an issue first to discuss your proposed changes or improvements.
This project is released under the MIT License.
Visit my web Carlos Ochoa
Note: If you encounter any issues with the project, please report them here. Contributions are welcome!