Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
W

wuchale

> 前端框架
Open source

Compile-time i18n toolkit that requires zero code changes and produces the smallest possible bundles. Supports React, Svelte, SolidJS, Astro, and more

398 stars0 likes3 views
WebsiteGitHub

About

Compile-time i18n toolkit that requires zero code changes and produces the smallest possible bundles. Supports React, Svelte, SolidJS, Astro, and more

wuchale

wuchale (pronounced /wʊtʃɑleɪ/ or wuh-'CHAH-lay) is a compile-time internationalization toolkit that requires no code changes. Write your components naturally, and wuchale automatically extracts and replaces translatable messages at build time.

  • No extra syntax! - Your normal code is enough, your codebase stays clean
  • Tiny catalogs to bundle - Text catalogs are just arrays, no keys necessary, like Protobuf
  • Zero-effort integration - Add i18n to existing projects without rewriting code
  • Framework agnostic - Works with React, Preact, Svelte(Kit), SolidJS, Astro, and plain JS/TS
  • Full URLs support - E.g. /about to /de/uber-uns
  • LLM translation support - Configurable integration for automatic on-the-fly translations
  • Full, granular HMR - Live updates during development, including LLM translation
  • Tiny footprint - Very few (less than 5) additional dependencies, no bloated node_modules
  • Smart extraction - Uses AST analysis to handle nested markup, conditionals, loops, and complex interpolations
  • Storage agnostic - Standard PO files by default, storage interface to store translations anywhere

A taste

With traditional i18n:

svelte

{t('Hello')}

Welcome {userName}

With wuchale:

svelte

Hello

Welcome {userName}

No imports, no special components, no annotations. wuchale handles everything at compile time by analyzing your code and automatically extracting translatable strings.

Getting started

See the Getting Started guide for instructions specific to your project type.

How it works

  1. Scans your source code using AST and identify translatable text content
  2. Extracts strings into standard .po translation files (or custom storage) for translators
  3. Compiles catalogs into compact modules which export arrays
  4. Replaces strings with translation function calls that access messages by indices from the arrays

Your original code stays clean and readable, while the build output is automatically internationalized.

Example

Let's say you have:

javascript
// src/components/Welcome.jsx
function Welcome({ user }) {
  return (
    

  )
}

The messages are extracted into a .po file. for Spanish for example, after translation, it looks like:

po
#~ src/components/Welcome.jsx
msgid "Hello, {0}, and welcome!"
msgstr "Hola, {0}, y ¡bienvenido!"

#~ src/components/Welcome.jsx
msgid "Get started"
msgstr "Comenzar"

Then they are compiled into a compact form optimized for loading (just an array):

javascript
export let c = [[[0, "Hola, ", 0], ", y ¡bienvenido!"], "Comenzar"]

And your code is transformed into a version that accesses them by index:

javascript
// src/components/Welcome.jsx
import W_tx_ from "@wuchale/jsx/runtime.jsx"

function Welcome({ user }) {
  const _w_runtime_ = _w_load_rx_();
  return (
    

  )
}

Notice the automatic handling of the nested ``, that's wuchale's full supported for indefinite nesting at play. You can nest as deep as you want, and it still makes it work for i18n. That gives the translator freedom to even reorder placeholders and it gets rendered accordingly.

Check out full working examples for different setups at wuchalejs/examples to see wuchale in action with different frameworks.

Repository structure

This is a monorepo that houses these packages:

Package Description Latest
wuchale Core + CLI + Vanilla adapter
@wuchale/jsx JSX adapter (for React and SolidJS)
@wuchale/svelte Svelte adapter
@wuchale/astro Astro adapter
@wuchale/json JSON storage

Contributing

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

Note: The tests are also written in TypeScript and therefore you should have Node 22+ to run them.

Sponsors

This project is supported by the community. Become a sponsor and get your name or logo listed on the README and the website! Sponsors: Special thanks to our supporters: And one private donor .

License

MIT

Issues· 7 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptai-translationastastrogettext

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架