bhashantarh
v1.1.0
Published
Tiny translation wrapper with fallbacks (LibreTranslate -> MyMemory) and detection with franc fallback.
Downloads
4
Maintainers
Readme
🌐 bhashantarh
A simple, lightweight NPM package to detect and translate text between languages using LibreTranslate.
Perfect for use in web apps, browser extensions, Node.js apps, and React projects.
✨ Features
- 🌍 Detect the language of any input text
- 🔁 Translate between supported languages
- 🧠 Uses free public translation API (LibreTranslate)
- ⚡ Easy to integrate in any project
📦 Installation
npm install bhashantarh🚀 Usage
const { detectLanguage, translate, getSupportedLanguages } = require("bhashantarh");
(async () => {
const lang = await detectLanguage("Bonjour");
console.log("Detected:", lang); // fr
const output = await translate("Hello", "en", "hi");
console.log("Translated:", output); // नमस्ते
console.log(getSupportedLanguages());
})();🌐 Supported Languages
Includes major global languages like:
- English, Hindi, Urdu, Arabic, Chinese, Russian, Tamil, Telugu, etc.
📄 License
MIT License
