CodeQual API supports 10 languages to serve our global developer community. All API responses, error messages, and documentation can be returned in the user's preferred language.
| Code | Language | Native Name | Script |
|---|---|---|---|
en |
English | English | Latin |
es |
Spanish | Español | Latin |
zh |
Mandarin | 中文 | Chinese |
hi |
Hindi | हिन्दी | Devanagari |
pt |
Portuguese | Português | Latin |
ja |
Japanese | 日本語 | Japanese |
de |
German | Deutsch | Latin |
ru |
Russian | Русский | Cyrillic |
fr |
French | Français | Latin |
ko |
Korean | 한국어 | Korean |
Add ?lang=xx to any API endpoint:
curl https://api.codequal.com/v1/analyze-pr?lang=es \
-H "X-API-Key: ck_your_key" \
-d '{"repositoryUrl": "...", "prNumber": 123}'Use standard HTTP headers:
# Using X-Language header (highest priority)
curl https://api.codequal.com/v1/analyze-pr \
-H "X-API-Key: ck_your_key" \
-H "X-Language: ja"
# Using Accept-Language header (standard)
curl https://api.codequal.com/v1/analyze-pr \
-H "X-API-Key: ck_your_key" \
-H "Accept-Language: fr-FR,fr;q=0.9"The API determines language in this order:
- Query parameter (
?lang=xx) X-LanguageheaderAccept-Languageheader- Default to English (
en)
{
"analysisId": "analysis_123",
"status": "queued",
"estimatedTime": 600,
"message": "Analysis started"
}{
"analysisId": "analysis_123",
"status": "en cola",
"estimatedTime": 600,
"message": "Análisis iniciado"
}{
"analysisId": "analysis_123",
"status": "排队中",
"estimatedTime": 600,
"message": "分析已开始"
}{
"analysisId": "analysis_123",
"status": "待機中",
"estimatedTime": 600,
"message": "分析を開始しました"
}Error messages are automatically translated:
{
"error": "Rate limit exceeded",
"code": "RATE_LIMIT_EXCEEDED",
"details": {
"limit": 1000,
"remaining": 0,
"reset": 1640995200
}
}{
"error": "Ratenlimit überschritten",
"code": "RATE_LIMIT_EXCEEDED",
"details": {
"limit": 1000,
"remaining": 0,
"reset": 1640995200
}
}GET /v1/languagesResponse:
{
"languages": [
{
"code": "en",
"name": "English",
"nativeName": "English",
"rtl": false
},
{
"code": "es",
"name": "Spanish",
"nativeName": "Español",
"rtl": false
}
// ... more languages
],
"default": "en",
"total": 10
}POST /v1/languages/translateRequest:
{
"text": "Your code quality score is 85/100",
"targetLanguage": "pt",
"context": "api"
}Response:
{
"translation": "Sua pontuação de qualidade de código é 85/100",
"sourceLanguage": "en",
"targetLanguage": "pt"
}POST /v1/languages/detectRequest:
{
"text": "이 코드는 개선이 필요합니다"
}Response:
{
"detectedLanguage": "ko",
"confidence": 0.95,
"languageName": "Korean"
}All official SDKs include language support:
const client = new CodeQualClient({
apiKey: 'ck_your_key',
language: 'es' // Spanish
});
// Or per-request
const result = await client.analyzePR(url, prNumber, {
language: 'zh'
});client = CodeQualClient(
api_key='ck_your_key',
language='fr' # French
)
# Or per-request
result = client.analyze_pr(
repo_url,
pr_number,
language='de'
)- Browser Applications: Detect user language from browser
const userLang = navigator.language.split('-')[0];- Server Applications: Use Accept-Language header
app.use((req, res, next) => {
const lang = req.acceptsLanguages(['en', 'es', 'zh', ...]);
req.language = lang || 'en';
next();
});- Mobile Apps: Use device locale
// iOS
let languageCode = Locale.current.languageCode ?? "en"
// Android
val languageCode = Locale.getDefault().language- CLI Tools: Add language flag
codequal analyze --lang ja https://github.com/...- Common phrases are pre-translated and cached
- First request in a new language may be ~100ms slower
- Subsequent requests use cached translations
- Cache is refreshed every 24 hours
- Technical Terms: Some technical terms remain in English
- Code Examples: Code snippets are not translated
- URLs: API endpoints remain in English
- IDs: Resource IDs (analysis IDs, etc.) are not translated
Help us improve translations:
- Report issues: api-translations@codequal.com
- Suggest improvements via GitHub issues
- Join our translation community
- Arabic support (RTL)
- Indonesian support
- Turkish support
- Custom terminology dictionaries
- Regional dialect options