Automatically find every hardcoded string in your React / Next.js project, translate it into multiple languages using AI, and wire up i18n — without touching a single file manually.
You have a React or Next.js app full of hardcoded English strings like this:
<h1>Welcome back</h1>
<button>Sign in</button>
<input placeholder="Enter your email" />Run one command and Transloom:
- Finds every hardcoded string across your entire codebase
- Translates them into your chosen languages using AI
- Writes locale JSON files (
en.json,de.json,fr.json…) - Replaces hardcoded strings with
t()calls in your source files - Sets up the i18n library (next-intl or i18next) for you
Your code becomes:
<h1>{t('welcome_back')}</h1>
<button>{t('sign_in')}</button>
<input placeholder={t('enter_email')} /># Step 1 — install globally
npm install -g transloom
# Step 2 — go to your project
cd my-react-app
# Step 3 — initialize (one time)
transloom init
# Step 4 — run automation
transloom scanThat's it. Your app is now i18n-ready.
# Global (recommended)
npm install -g transloom
# Or run without installing
npx transloom initRequirements: Node.js 18 or higher
Run this once inside your project before anything else.
transloom initIt will ask you:
- Your Transloom API key (
tl_xxxx…) - Target languages (German, French, Spanish, Urdu, Chinese…)
- Output directory for locale files (default:
public/locales) - Whether to enable namespace support (groups keys by feature)
Creates a .transloom.json config file in your project root.
The main command. Scans your project, translates strings, and sets everything up.
transloom scanDuring the scan it interactively asks:
| Prompt | What it does |
|---|---|
| Which framework? | Next.js or React — installs the right package |
| Set up i18n? | Install next-intl / i18next and create config files |
| Create GitHub PR? | Backend opens a PR with all the changes |
| Language selector component? | Already have one / Create for me / I'll do it later |
| Replace strings in source? | Shows a preview of all replacements, then asks to confirm |
Want to see what strings would be extracted without changing any files?
transloom scan --dry-runShows a table of every string found (file, line number, text) and exits — nothing is written or replaced.
Check that everything is correctly set up before running a scan.
transloom validateChecks:
.transloom.jsonexists- API key format and authentication
- Your scan usage / limit
- Framework configuration
- Languages list
- Output directory
package.jsonpresent- i18n package installed (next-intl or i18next)
Example output:
✔ .transloom.json found
✔ API key authenticated as john_doe
✔ Usage: 3/10 scans
✔ Framework: nextjs
✔ Languages: en, de, fr
✔ Output dir: public/locales
✔ next-intl installed (^3.0.0)
✅ All checks passed (7/7)
Shows your account info, usage stats, and current project config.
transloom statusRemoves everything Transloom added to your project.
transloom uninstallRemoves:
- Installed i18n packages (
next-intlori18next react-i18next) - Generated files (
i18n/request.ts,middleware.ts,LanguageSelector.tsxetc.) - Translation locale files (
public/locales/) .transloom.jsonconfig
your-project/
├── i18n/
│ └── request.ts ← locale configuration
├── middleware.ts ← routing middleware
├── public/locales/
│ ├── en.json
│ ├── de.json
│ └── fr.json
└── app/components/
└── LanguageSelector.tsx ← ready-to-use switcher (if requested)
your-project/
├── src/
│ ├── i18n.ts ← i18next configuration
│ ├── I18nProvider.tsx ← wrap your app with this
│ └── components/
│ └── LanguageSelector.tsx
└── public/locales/
├── en.json
└── de.json
.transloom.json is created by transloom init and lives in your project root.
{
"apiKey": "tl_xxxxxxxxxxxx",
"languages": ["en", "de", "fr"],
"framework": "nextjs",
"outputDir": "public/locales",
"namespace": false,
"ignore": ["node_modules", "dist", ".next", "build", "coverage", ".git"]
}| Field | Description |
|---|---|
apiKey |
Your Transloom API key |
languages |
Languages to translate into — en is always the base |
framework |
"nextjs" or "react" |
outputDir |
Where locale JSON files are written |
namespace |
Group keys by feature (auth.login) instead of flat (login) |
ignore |
Folders to skip during file discovery |
When namespace: true, keys are grouped by the feature/folder they come from instead of being flat.
Without namespace (default):
{
"login": "Login",
"signup": "Sign Up",
"dashboard_title": "Dashboard",
"profile_name": "Your Name"
}With namespace:
{
"auth": {
"login": "Login",
"signup": "Sign Up"
},
"dashboard": {
"title": "Dashboard"
},
"profile": {
"name": "Your Name"
}
}Code becomes:
t("auth.login"); // instead of t('login')
t("dashboard.title"); // instead of t('dashboard_title')Namespaces are derived automatically from the file path:
src/app/auth/page.tsx→authsrc/app/dashboard/page.tsx→dashboardsrc/components/Navbar.tsx→navbar
Enable it during transloom init or add "namespace": true to .transloom.json manually.
transloom scan
│
├─ 1. Validate API key + check scan limit
├─ 2. Ask: framework (Next.js / React)
├─ 3. Discover all .js .jsx .ts .tsx files
├─ 4. Ask: set up i18n? (Yes / No)
├─ 5. Ask: create GitHub PR? (Yes / No)
├─ 6. Extract hardcoded strings using AST parser (tree-sitter)
├─ 7. Send strings to Transloom backend
├─ 8. AI translates into all selected languages
├─ 9. Preview replacements → ask confirmation
├─ 10. Write locale JSON files
├─ 11. Replace hardcoded strings with t() calls in source
└─ 12. Install i18n package + create setup files
| Type | Example |
|---|---|
| JSX text | <button>Sign in</button> |
| Attributes | placeholder="Enter email" |
| Toast/alert calls | toast.success("Saved!") |
- URLs, hex colors, class names
- Numbers and operators
- camelCase identifiers
- Single-character strings
- Code fragments
- ✅ Your source code never leaves your machine
- ✅ Only the extracted text strings are sent to the server
- ✅ API key authenticated on every request
- ✅ All communication over HTTPS
- 🌐 Dashboard: localeflow.vercel.app
- ⚙️ Backend: github.com/being-devahmad/transloom-backend
- 📦 npm: npmjs.com/package/transloom
Built for developers, by Ahmad Owais