Quickstart
-
Install Tyndale
Terminal window npm install tyndale-reactnpm install -D tyndale -
Initialize your project
Terminal window npx tyndale initThis creates
tyndale.config.jsonwith default settings, including.astroinextensions. -
Authenticate with your AI provider
Terminal window npx tyndale authFollow the prompts to configure your API key (Anthropic, OpenAI, etc.).
-
Wrap translatable content
import { T, useTranslation } from 'tyndale-react';export function Welcome() {const t = useTranslation();return (<div><T>Welcome to our app!</T><p>{t('You have {count} items', { count: 3 })}</p></div>);} -
Extract and translate
Terminal window npx tyndale translateTyndale scans your source files, extracts translatable strings, and generates translations for all configured locales.
Supported frameworks
Section titled “Supported frameworks”App translation
Section titled “App translation”- React
- Vite + React
- Next.js
- Astro components (
.astro)
Documentation translation
Section titled “Documentation translation”- Starlight
- Docusaurus
- VitePress
- MkDocs
- Nextra
Using Astro instead of React
Section titled “Using Astro instead of React”If you are translating .astro pages/components, add Astro’s React integration first if your project does not already render React components:
npx astro add reactThen follow the dedicated Astro setup guide. Use Translating Documentation for Starlight and other docs sites.
What just happened?
Section titled “What just happened?”Tyndale scanned your JSX or .astro templates for <T> components and useTranslation() calls, extracted the English source text, sent it to your AI provider for translation, and wrote locale files to your output directory.
No key files. No manual JSON editing. Your translations are ready.
Next steps
Section titled “Next steps”- Configure your project — locales, AI model, output directory
- Set up Astro —
.astrofiles and React integration - Set up Next.js — middleware, providers, static generation
- Translate docs — Starlight, Docusaurus, VitePress, MkDocs, Nextra
- Learn the React API — all components and hooks