Full Stack Developer

Khalid.dev
Case study · by Khalid Chouhan

Magic Translate — Auto Translation for React & Next.js

Magic Translate — Auto Translation for React & Next.js — screenshot

Overview

An open-source NPM package that automatically translates your entire React/Next.js app with zero manual work. One CLI command scans your entire project, finds all static text using Babel, translates everything into your chosen languages using free APIs — no API key required — and saves the translations automatically. At runtime, a DOM TreeWalker replaces all text nodes instantly when the user switches language, without any page reload. No t() functions to write, no translation keys to maintain, no JSON files to edit manually, and no third-party accounts to create. Just install the package, run one command, answer two questions, wrap your app with a single provider, and your entire application supports 60+ languages out of the box.