LangWeave
Detect text languages. Translate between language pairs. Build internationalized Rust applications.
• Website • Documentation • Report Bug • Request Feature • Contributing Guidelines
Status
Experimental — This library is under active development. API may change in future versions.
| Version | Status | Notes |
|---|---|---|
| 0.0.x | Experimental | API subject to change |
| 0.1.x | Beta (planned) | API stabilization |
| 1.0.x | Stable (planned) | Stable API, semver guarantees |
Features
- Language Detection — Identify text languages across 15 supported languages including English, French, German, Spanish, Portuguese, Italian, Dutch, Russian, Arabic, Hebrew, Hindi, Japanese, Korean, Chinese, and Indonesian
- Translation Engine — Translate between supported language pairs
- Error Handling — Comprehensive error types for robust applications
- Async Support — Non-blocking language detection and translation
- Simple API — Easy-to-use functions for common tasks
- Safety — Built with
#![forbid(unsafe_code)]in library code
Installation
Add to Cargo.toml:
[]
= "0.0.2"
Requirements
- MSRV: Rust 1.87.0 or later
Feature Flags
| Feature | Description | Default |
|---|---|---|
default |
No optional features enabled | ✅ |
async |
Enable async utilities for non-blocking operations | ❌ |
Enable features in Cargo.toml:
[]
= { = "0.0.2", = ["async"] }
Quick Start
Detect language and translate text:
use ;
use I18nError;
Examples
Run examples:
cargo run --example <example_name>
Known Limitations
- Short text detection — Very short texts (< 10 characters) may not have enough signal for accurate language detection
- Mixed-language content — Text containing multiple languages may only detect the dominant language
- Romanized scripts — Languages written in non-native scripts (e.g., Japanese in romaji) may not be detected correctly
- Translation coverage — Not all phrases have translations; the library falls back to the original text for unknown keys
Documentation
Browse complete API reference at docs.rs/langweave.
Contributing
Read Contributing Guidelines before submitting changes.
License
Choose either Apache 2.0 or MIT license.
🎨 Designed by Sebastien Rousseau — https://sebastienrousseau.com/ 🚀 Engineered with Euxis — Enterprise Unified eXecution Intelligence System — https://euxis.co/