xnx3/translate
AI i18n, Two lines of js realize automatic html translation. No need to change the page, no language configuration file, no API key, SEO friendly!
What it solves
This project provides a way to automatically translate entire HTML pages into hundreds of languages without requiring manual configuration of language files, API keys, or changes to the original page structure. It aims to simplify the internationalization (i18n) process for website owners who want to make their content accessible globally without the overhead of traditional translation workflows.
How it works
It is a JavaScript library that scans the DOM of a webpage and automatically identifies and translates text elements. It supports multiple translation service channels (including AI-powered ones like GiteeAI) and utilizes a multi-threaded acceleration system with three layers of caching and pre-loading to ensure millisecond-level translation speeds. It can be integrated into a site via a few lines of code or deployed as a private translation API service for higher security and privacy.
Who it’s for
- Website developers who need a quick, low-effort way to add multi-language support to their sites.
- Enterprise and government agencies requiring private deployment of translation services for data privacy.
- Open-source project maintainers (CMS, UI frameworks, etc.) wanting to integrate seamless translation.
- Developers looking to build browser extensions or translation APIs based on an open-source foundation.
Highlights
- Zero-config setup: Add a few lines of JS to enable translation across hundreds of languages.
- AI-powered: Supports integration with LLMs (like Qwen, GLM, DeepSeek) for higher quality translation.
- SEO friendly: Does not modify the original source code, ensuring search engine indexing remains unaffected.
- Highly customizable: Allows specifying translation areas, ignoring specific IDs/classes/tags, and defining custom terminology.
- Private deployment: Supports self-hosting the translation API for offline or secure environments.
- Dynamic content support: Monitors DOM changes in real-time to translate content generated by frameworks like Vue or React.
- Lightweight model: Includes a specialized, low-hardware-requirement translation model (
translate100) for edge devices.
Related
- Project
- Project
- Project
- Project
- Project