Neural machine translation powered by Google Cloud Translation. Add translation capabilities to your app—translate documents, communications, and evidence across 100+ languages with automatic language detection.
Quick start
import Casedev from 'casedev' ;
const client = new Casedev ({ apiKey : process . env . CASEDEV_API_KEY });
// Translate text to Spanish
const result = await client . translate . v1 . translate ({
q : 'The deposition will be held on Monday at 10:00 AM.' ,
target : 'es'
});
console . log ( result . data . translations [ 0 ]. translatedText );
// "La deposición se llevará a cabo el lunes a las 10:00 AM."
Endpoints
Translate POST /translate/v1/translate — Translate text to target language
Detect Language POST /translate/v1/detect — Detect the language of text
Supported Languages GET /translate/v1/languages — List all supported languages
Features
100+ Languages — Support for all major world languages including Chinese, Spanish, Arabic, Hindi, and more.
Auto-Detection — Automatically detect source language when not specified.
Batch Translation — Translate multiple strings in a single request for efficiency.
HTML Preservation — Preserve HTML formatting during translation.
Neural Machine Translation — State-of-the-art NMT models for high-quality translations.
Pricing
Service Cost Translation $0.03 per 1,000 characters Language Detection $0.03 per 1,000 characters Supported Languages Free
Example: A 10,000 character legal document costs $0.30 to translate.
Common use cases
Multilingual discovery
Translate foreign-language documents discovered during litigation:
TypeScript
Python
C#
Java
PHP
Go
CLI
const foreignDoc = await fetchDocumentText ();
const result = await client . translate . v1 . translate ({
q : foreignDoc ,
target : 'en' , // Translate to English
format : 'text'
});
Client communications
Translate client correspondence in their preferred language:
TypeScript
Python
C#
Java
PHP
Go
CLI
const languages = [ 'es' , 'zh' , 'ar' ]; // Spanish, Chinese, Arabic
for ( const lang of languages ) {
const translated = await client . translate . v1 . translate ({
q : emailContent ,
target : lang
});
// Send localized email
}
Evidence processing
Detect and translate multilingual evidence:
TypeScript
Python
C#
Java
PHP
Go
CLI
// First detect the language
const detection = await client . translate . v1 . detect ({
q : evidenceText
});
const sourceLanguage = detection . data . detections [ 0 ][ 0 ]. language ;
// Then translate if not English
if ( sourceLanguage !== 'en' ) {
const translated = await client . translate . v1 . translate ({
q : evidenceText ,
source : sourceLanguage ,
target : 'en'
});
}
Vault Store translated documents alongside originals for searchable archives
OCR Extract text from scanned documents before translation