Skip to content

nekofar/nextjs-lingui-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Next.js & Lingui: Building a Multi-Lingual Website

GitHub release (latest SemVer including pre-releases) GitHub Workflow Status (branch) GitHub X (formerly Twitter) Follow Farcaster (Warpcast) Follow Donate

Overview

Welcome to the Next.js and Lingui static site generation (SSG) template project! This repository demonstrates the state-of-the-art integration of Next.js and Lingui for creating static web apps with multi-lingual support.

Next.js, a powerful React framework, is designed to build server-rendered React applications and SSG sites. In this context, we're utilizing Next.js's Static Site Generation capabilities to pre-render pages at build time.

Combined with Lingui, an i18n (internationalization) library for JavaScript, we've endeavored to produce a multilingual static website that effectively caters to a global audience.

Our aim with this template project is to illustrate the procedure of building an international static web app that is performant, SEO-advantaged, and maintains simplified translation management, courtesy of the capabilities brought about by the coupling of Next.js's SSG and Lingui.

Key Features

  • Static Site Generation with Next.js: Experience the unique advantages of utilizing Next.js in our static web application. This includes benefits such as improved performance and SEO, client-side routing, and a more streamlined development process.
  • Translation Management with Lingui: Discover how Lingui simplifies handling translations in our static web app, from message extraction to language pluralization and localized formatting.
  • Real-time Language Switching: Experience an interactive feature of our static web app that enables dynamic language switching. This allows users to effortlessly switch between different languages without navigating away from their current page.

Getting Started

Click on Use this template to create the repo for your app.

Then, to use this project template, follow these steps:

  1. Clone this repository: git clone https://github.com/your-username/your-repo.git
  2. Navigate to the project directory: cd your-repo
  3. Install project dependencies: pnpm install
  4. Start the development server: pnpm run dev
  5. Open your browser and visit http://localhost:3000 to see the application in action.

Contributing

We welcome contributions to this project! To contribute, follow these steps:

  1. Fork the repository
  2. Create a new branch: git checkout -b your-feature
  3. Make your changes and commit them: git commit -m "Add your feature"
  4. Push to the branch: git push origin your-feature
  5. Open a pull request to the main branch of this repository

License

This project is licensed under the Apache License - see the LICENSE file for details.