Complete internationalization blueprint for Next.js — routing, translations, RTL support, currency formatting, date localization, and SEO hreflang tags.
Uploaded markdown content, not a verification of tool compatibility or results. Review the raw text, commands, and permissions before using it. Stars require an account.
name: i18n-setup
description: Full i18n system for Next.js applications
Add 20+ languages to your Next.js app in minutes.
middleware.ts → Language detection + routing
lib/i18n.ts → Translation keys + types
lib/i18n-utils.ts → localePath(), getLang(), formatDate()
contexts/LangContext → Client-side language state
app/[lang]/layout.tsx → Lang validation + dir (RTL)
type Translations = {
nav: { home: string; blog: string; pricing: string };
hero: { title: string; subtitle: string; cta: string };
common: { loading: string; error: string; save: string };
// ... 50+ keys
};
EN, DE, FR, ES, IT, PT, NL, PL, RU, UK, CS, SK, RO, SV, FI, EL, TR, AR, HI, KO, ZH, JA
1. Copy the template files into your project
2. Add your translation keys
3. Wrap your app with LangProvider
4. Use t.key in components