@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
Markdown
# 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+)