Skip to content
Logo

Protobuf-like i18n from plain code

Compile-time i18n for React, Svelte, SolidJS and more. Extract translations from plain code without changing your workflow.

Write plain code

Without any need to do anything different:

<p>Hello world!</p>

Extract and translate

Into PO files and optionally live translate using AI

msgid "Hello world!"
msgstr "Hello world!"

Transform

Update your code to access the translations by index

<p>{_w_runtime_.t(0)}</p>

Render

Load the desired compiled catalog, and hand it to your framework

<p>¡Hola Mundo!</p>

Works with your stack!

React Logo
React
Preact Logo
Preact
SolidJS Logo
SolidJS
Svelte Logo
Svelte
JavaScript Logo
JavaScript
TypeScript Logo
TypeScript
Python* Logo
Python*
Golang* Logo
Golang*
INPUT
'use client'
export function Greeting({ username }) {
return (
<div>
<p>Hello!</p>
<p title="Welcome" class="para">
Welcome {username}!
</p>
</div>
)
}
OUTPUT
'use client'
import _w_to_rt_ from 'wuchale/runtime'
import _w_load_rx_, { get as _w_load_ } from "./loader.js"
import W_tx_ from "@wuchale/jsx/runtime.jsx"
export function Greeting({ username }) {
const _w_runtime_ = _w_to_rt_(_w_load_rx_('jsx'))
return (
<div>
<p>{_w_runtime_.t(0)}</p>
<p title={_w_runtime_.t(1)} class="para">
<W_tx_ x={_w_runtime_.cx(2)} a={[username]} />
</p>
</div>
)
}
PO file (for translators)
msgid "Hello!"
msgstr "Hello!"
msgid "Welcome"
msgstr "Welcome"
msgid "Welcome {0}!"
msgstr "Welcome {0}!"
Compiled JS (for runtime)
export let c = [
'Hello!',
'Welcome',
[ 'Welcome ', 0, '!' ],
]

Smallest Bundles

Protobuf-like compilation produces arrays instead of key-based objects.

Real-time Translation

HMR + optional AI translation for real-time development feedback.

Flexible catalog loading

You decide how the catalog is loaded: Async, Bundled, or custom.

Standard format

The catalogs are in the Gettext PO format, widely supported and familiar to translators.

Explore more benefits

Used by projects

AlchemillaHQ/SylveAlchemillaHQ/SylveLightweight GUI for managing Bhyve, Jails, ZFS, networking, and more on FreeBSD
NookNookRun local AI models in your browser for chat, audio transcription, text to speech and background removal
CIGALECIGALEIntelligent Classification and Management of Arthropods and Entomofauna

Do you also use it in your project? Let us know!

Inspiration

This project was inspired by Lingui especially some of its workflow. If you’ve used Lingui before, you’ll find familiar concepts like extraction and compilation.

Where wuchale differs, among other things, is that you don’t need to change your code, catalogs compile smaller than any other tool (including Lingui’s), and it integrates with a wider range of frameworks.

Support

This project is supported by the community. Become a sponsor and get your name or logo listed here and the README!

Sponsor on GitHub

Donate on Open Collective