Skip to main content

AI-native translation tool using source text as keys

Project description

TransDuck

AI-powered translation for apps and websites. Fast. Cheap. No keys to manage.

TransDuck translates your app's strings using AI, then caches them locally in SQLite so you never pay for the same translation twice. No translation files. No key naming. No sync headaches.

import transduck
from transduck import ait, ait_plural

transduck.initialize()
transduck.set_language("DE")

ait("Welcome to Mallorca")              # → "Willkommen auf Mallorca"
ait("Hello {name}", vars={"name": "Tim"})  # → "Hallo Tim"
ait_plural("{count} night", "{count} nights", count=7)  # → "7 Nächte"

Why TransDuck?

  • No keys to manage — your source text is the key
  • No translation files — translations live in a local SQLite database
  • Translate once, pay once — cached lookups take ~0.015ms, zero API costs after first call
  • AI that understands context — project and per-string context for accurate translations
  • Pluralization that works everywhere — handles Russian (4 forms), Arabic (6 forms) automatically
  • Dirt cheap — 1,000 strings × 5 languages ≈ $0.10 with gpt-4.1-mini

Quick Start

pip install transduck
export OPENAI_API_KEY=sk-...
transduck init

CLI

transduck scan --warm --langs DE,ES,IT   # scan codebase and translate everything
transduck translate "Hello" --to DE       # translate a single string
transduck stats                           # check your translation database

Also available for JavaScript/TypeScript

npm install transduck

Includes React/Next.js integration via transduck/react with synchronous t() for client components.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

transduck-0.6.9.tar.gz (38.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

transduck-0.6.9-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file transduck-0.6.9.tar.gz.

File metadata

  • Download URL: transduck-0.6.9.tar.gz
  • Upload date:
  • Size: 38.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for transduck-0.6.9.tar.gz
Algorithm Hash digest
SHA256 7d4997abf7587fec8c764546f82e25516d28d87737c03a913ba970f02f37084c
MD5 0cdf734279eee4cf73b76695c31c45c2
BLAKE2b-256 132c7c47eed46a2e69167fa97b39a4fc4e51acc7848f5bfeff5fdb460558a819

See more details on using hashes here.

File details

Details for the file transduck-0.6.9-py3-none-any.whl.

File metadata

  • Download URL: transduck-0.6.9-py3-none-any.whl
  • Upload date:
  • Size: 28.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for transduck-0.6.9-py3-none-any.whl
Algorithm Hash digest
SHA256 e9c99033c904c59c7a86dad1b1c5b1420ee209185e48f12ef1ab6b8625d93aa0
MD5 71ffb30bf9013f4ee613ed49d93a6b27
BLAKE2b-256 2c53a1ca46b7278afd9fa92ed5856ca914d21b4e2f337fa75fae13d36c1f735b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page