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 implement automatic, AI-powered internationalization (i18n) for HTML pages without requiring manual translation files, API keys, or changes to the original page structure. It eliminates the need for developers to create and maintain complex language configuration files for every supported language.
How it works
It is a JavaScript library that scans the DOM of a webpage to automatically identify and translate text content. It supports multiple translation service channels (including a default open-source service and the ability to use private deployments or LLM-based APIs like GiteeAI). To ensure performance, it uses multi-threaded acceleration, a three-layer caching mechanism, and text pre-processing cleaning.
Who it’s for
Web developers and site owners who want to add multi-language support to their websites quickly and automatically, as well as organizations requiring private deployment of translation services for data privacy and security.
Highlights
- Easy Integration: Add a few lines of JavaScript to a page to enable translation into hundreds of languages.
- Detailed Control: Ability to specify translation areas, exclude specific IDs/classes/tags, and define custom terminology.
- Dynamic Content Support: Monitors the DOM for changes (e.g., in Vue or React apps) to translate content rendered via JavaScript in real-time.
- Private Deployment: Supports self-hosting the translation API service for secure, offline, or internal network environments.
- SEO Friendly: Does not modify the original source code crawled by search engine bots.
- Dedicated Model: Includes a distilled Transformer-based model (
translate100) optimized for low-end hardware (1-core, 2GB RAM) to ensure translation reliability.
Related
- Project
- Project
- Project
- Project
- Project