@tupipu/translator
v1.1.6
Published
A lightweight, extensible, and production-ready translation framework built specifically for Next.js apps. This package simplifies internationalization (i18n) by combining static and dynamic translations, language detection, server/client rendering compat
Readme
Tupipu Language Translator
A lightweight, extensible, and production-ready translation framework built specifically for Next.js apps. This package simplifies internationalization (i18n) by combining static and dynamic translations, language detection, server/client rendering compatibility, and seamless JSON-based localization.
Built with support for app directory (Next.js 13/14+), middleware-based locale detection, and context-aware translations in both server and client components.
✅ Features:
🌐 Full i18n support for static, dynamic, and server-side rendered content
🚀 App Router compatible (Next.js 13+), optimized for React Server Components (RSC)
🧠 Automatic language detection via headers, cookies, or route
🪶 Lightweight JSON-based translation files with lazy loading
⚡ Type-safe hooks and context API (useTranslation, useLanguage)
🧩 Easily integrates with CMS, external APIs, or translation services
🔁 Supports fallback languages and runtime switching
📁 Works seamlessly with the public/locales/ folder and dynamic routes
🛠 Use Cases:
Multi-language corporate websites (e.g. English, Spanish, French)
SaaS dashboards requiring runtime UI switching
Static pages + API-backed content needing localization
SEO-friendly international pages via subpaths or domain routing
🧱 Stack Compatibility:
✅ Next.js (v13–v14+)
✅ React 18+ (Client & Server Components)
✅ TypeScript
✅ Tailwind / shadcn / SWR friendly
✅ Node.js (v16+)
