translate.js

translate.js

★ 3.8 🔖 1200 saves 💰 Free GitHubTranslation

translate.js is an open-source JavaScript library that adds automatic translation to any web page with just two lines of code. Drop in the script, call one function, and your existing HTML is translated into your visitor’s language on the fly — no separate language versions of your pages, no translation files to maintain and no API key to configure. The project has about 3,100 stars on GitHub and continues to be updated in 2026.

Overview

The library works entirely on the client side: it detects the user’s language, walks the DOM and replaces text nodes with translations served by its translation channels, while watching for dynamically loaded content so single-page apps and AJAX updates are handled too. Site owners keep control through ignore lists — specific tags, classes or elements can be excluded — and the current language can be forced or switched through a built-in selector UI. Because translation happens in the browser without restructuring URLs, it stays SEO-friendly compared with machine-generated duplicate pages, and it supports well over a hundred languages. For small sites, blogs, documentation and product pages that cannot justify a full i18n engineering effort, translate.js offers a pragmatic shortcut: paste two lines, and the site becomes readable worldwide.

Key Features

  • Two lines of JavaScript add automatic translation to any existing page
  • No page restructuring, language files or API keys required
  • Detects visitor language and translates DOM content, including dynamic updates
  • Ignore rules for tags, classes and elements that must stay untranslated
  • Built-in language switcher and support for 100+ languages
  • SEO-friendly approach that avoids maintaining parallel translated sites

💳 Pricing

translate.js is completely free and open source under the MIT license, and its default translation channels work without signing up for a paid translation API.

Who Is It For

translate.js is for website owners, bloggers and small product teams who want instant multilingual reach for an existing site without the cost and maintenance of a full internationalization project.

🚀 Visit translate.js Official Site

🚩 Report an issue