A minimal Next.js app to translate Voiceflow .vf files. Upload a .vf file, choose a target language, and download the translated file. Uses the public Google Translate API.
- Upload a .vf file (browse or drag and drop).
- Translate text fields inside the .vf JSON (e.g. name, title, value, text, variables) to the chosen language.
- Download the translated .vf file.
npm install
npm run devOpen http://localhost:3000.
- Upload a .vf file (browse or drag and drop).
- Choose a Target language from the dropdown.
- Click Translate (source language is auto-detected).
- Click Download .vf to save the translated file.
No API key is required for the public Google Translate endpoint used here.
1. Try with the included example file
# Start the app
npm run devThen in the browser:
- Go to http://localhost:3000.
- Drag and drop
example/sample.vfonto the upload area (or click to browse and select it). - Choose a target language (e.g. Spanish).
- Click Translate and wait for the run to finish.
- Click Download .vf to get e.g.
sample - Spanish.vf.
2. Translate via API (programmatic)
# Translate a single string
curl -X POST http://localhost:3000/api/translate \
-H "Content-Type: application/json" \
-d '{"langFrom":"auto","langTo":"es","text":"Hello, world!"}'
# Response: {"res":"¡Hola, mundo!"}The repo includes a minimal .vf file you can use to test the app:
| File | Description |
|---|---|
| example/sample.vf | Minimal Voiceflow-style JSON with name, title, text, and variables. |
Use it to verify upload → translate → download without a real project export.
- Next.js 14 (App Router)
- Tailwind CSS
- Translate API:
POST /api/translatewith body{ langFrom, langTo, text }; returns{ res: "translated text" }.
app/
page.js # Single page: upload .vf, translate, download
layout.js
api/translate/
route.js # POST handler – calls Google Translate
lib/
utils.js # Language list for the dropdown
example/
sample.vf # Minimal example .vf file
npm run build
npm startSee LICENSE.