Documentation
Welcome to the Ltranslate documentation. Here you'll find everything you need to integrate our translation services into your website or application.
Nginx Configuration
Learn how to configure Nginx to work with Ltranslate for seamless website translation integration.
- Basic setup
- Advanced configuration
- Performance optimization
HTTP Reverse Proxy
Configure various reverse proxy servers including Cloudflare, Apache, and others to enable translation services.
- Cloudflare setup
- Apache configuration
- General proxy setup
Submit HTML API
Enterprise-grade API for submitting HTML content directly for translation, perfect for isolated network environments.
- API reference
- Authentication
- Code examples
PDF Translation Service
Complete API documentation for translating PDF files, including upload, processing, and download functionality.
- Upload API
- Remote PDF handling
- Task management
Quick Start
Sign Up
Create your Ltranslate account and get your API key.
Choose Integration
Select the integration method that best fits your infrastructure.
Configure
Follow the configuration guides to set up your translation service.
Go Live
Deploy your translated site and start reaching global audiences.
API Overview
RESTful API
Simple, intuitive RESTful API with JSON responses for easy integration.
Authentication
Secure API key-based authentication for all requests.
Rate Limiting
Flexible rate limiting based on your subscription plan.
Error Handling
Comprehensive error responses with detailed error codes.
Code Examples
Integration examples in multiple programming languages:
curl -X POST "https://engine.ltranslate.cn/site/html" \
-H "Content-Type: application/json" \
-H "api-key: YOUR_API_KEY" \
-H "source-lang: en" \
-H "target-lang: zh-cn" \
-d '{"html": "<html><body>Hello World</body></html>"}'
$url = 'https://engine.ltranslate.cn/site/html';
$data = ['html' => 'Hello World'];
$headers = [
'Content-Type: application/json',
'api-key: YOUR_API_KEY',
'source-lang: en',
'target-lang: zh-cn'
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;
const https = require('https');
const data = JSON.stringify({
html: 'Hello World'
});
const options = {
hostname: 'engine.ltranslate.cn',
path: '/site/html',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': data.length,
'api-key': 'YOUR_API_KEY',
'source-lang': 'en',
'target-lang': 'zh-cn'
}
};
const req = https.request(options, (res) => {
res.on('data', (chunk) => {
console.log(chunk.toString());
});
});
req.write(data);
req.end();
import requests
url = 'https://engine.ltranslate.cn/site/html'
headers = {
'Content-Type': 'application/json',
'api-key': 'YOUR_API_KEY',
'source-lang': 'en',
'target-lang': 'zh-cn'
}
data = {
'html': 'Hello World'
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
Support & Resources
Community Forum
Join our community to share experiences and get help from other developers.
Visit Forum