UNPKG

@tupipu/translator

Version:

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

46 lines (23 loc) • 1.5 kB
# 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+)