Skip to content

opeoyeleke/i18n-typescript-react-demo

Repository files navigation

i18n React Demo

This project demonstrates how to set up internationalization (i18n) in a React + TypeScript + Vite application.
It includes a minimal configuration with hot module replacement (HMR), ESLint rules, and a working translation setup with English (EN) and French (FR).


Features

  • ⚡️ Vite for fast development and HMR
  • ⚛️ React + TypeScript boilerplate
  • 🌍 i18n support with multiple locales (English & French)
  • 🔄 Runtime language switching via a simple <select> dropdown
  • ✅ ESLint setup for consistent code quality

Getting Started

Install dependencies

npm install
# or
yarn install

Run the app

npm run dev
# or
yarn dev

App will be available at: http://localhost:5173

Translations

Translations live in src/locales/.

Add more languages (e.g., Spanish, German) • Persist selected language in localStorage • Use namespaces for modular translation files (e.g., auth, wallet, settings)

About

A simple React + TypeScript + Vite demo showcasing internationalization (i18n) with English and French translations, dynamic language switching, and clean project structure.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors