Vite logo


npm package build status Start new PR in StackBlitz Codeflow


wuchale is A non-invasive, normal code based compile-time internationalization (i18n) toolkit.

🎯 Smart translations, tiny runtime, full HMR. Extract strings at build time, generate optimized translation catalogs, support live translations (even with Gemini AI), and ship minimal code to production.

Why wuchale?

Traditional i18n solutions require you to wrap every translatable string with function calls or components. wuchale doesn’t.

<!-- Traditional i18n -->
<p>{t('Hello')}</p>
<p><Trans>Welcome {userName}</Trans></p>

<!-- With wuchale -->
<p>Hello</p>
<p>Welcome {userName}</p>

Write your code naturally. No imports, no wrappers, no annotations. wuchale handles everything at compile time.

Try live examples in your browser, no setup required:

  • Vanilla TS: Vanilla TS example on StackBlitz
  • Svelte: Svelte example on StackBlitz
  • SvelteKit: SvelteKit TS example on StackBlitz
  • SvelteKit (advanced): Advanced SvelteKit example on StackBlitz

✨ Key Features

  • πŸ”§ Zero-effort integration - Add i18n to existing projects without rewriting code
  • πŸš€ Compile-time optimization - All transformations happen during build, minimal runtime overhead
  • πŸ”„ Full, granular HMR support - Live updates during development, including auto-translation
  • πŸ“¦ Tiny footprint - Only 2 additional dependencies (wuchale + pofile), no bloated node_modules
  • 🎯 Smart extraction - Uses AST analysis: handles nested markup, conditionals, loops, and complex interpolations
  • 🌍 Standard .po files - Compatible with existing translation tools and workflows
  • πŸ€– Optional AI translation - Gemini integration for automatic translations during development

πŸš€ Installation and usage

Please look at the Installation and Usage pages.

🀝 Contributing

Contributions are welcome! Please check out our test suites located inside each package for examples of supported scenarios.

❀️ Sponsors

Thank you @hayzamjs for sponsoring the project and using it in Sylve, giving valuable feedback!