Skip to content

Quickstart

  1. Install Tyndale

    Terminal window
    npm install tyndale-react
    npm install -D tyndale
  2. Initialize your project

    Terminal window
    npx tyndale init

    This creates tyndale.config.json with default settings, including .astro in extensions.

  3. Authenticate with your AI provider

    Terminal window
    npx tyndale auth

    Follow the prompts to configure your API key (Anthropic, OpenAI, etc.).

  4. 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>
    );
    }
  5. Extract and translate

    Terminal window
    npx tyndale translate

    Tyndale scans your source files, extracts translatable strings, and generates translations for all configured locales.

  • React
  • Vite + React
  • Next.js
  • Astro components (.astro)
  • Starlight
  • Docusaurus
  • VitePress
  • MkDocs
  • Nextra

If you are translating .astro pages/components, add Astro’s React integration first if your project does not already render React components:

Terminal window
npx astro add react

Then follow the dedicated Astro setup guide. Use Translating Documentation for Starlight and other docs sites.

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.