Multi-lingual
Configure Ask0 to support multiple languages. Add translations, handle multi-language content, and provide localized AI assistance.
Ask0 supports conversations in multiple languages, allowing you to serve global audiences with accurate, culturally appropriate responses in their preferred language.
Language Capabilities
Supported Languages
Ask0 supports 95+ languages including:
Major Languages
- 🇬🇧 English
- 🇪🇸 Spanish
- 🇫🇷 French
- 🇩🇪 German
- 🇵🇹 Portuguese
- 🇮🇹 Italian
- 🇷🇺 Russian
- 🇨🇳 Chinese (Simplified/Traditional)
- 🇯🇵 Japanese
- 🇰🇷 Korean
Regional Languages
- 🇳🇱 Dutch
- 🇵🇱 Polish
- 🇸🇪 Swedish
- 🇳🇴 Norwegian
- 🇩🇰 Danish
- 🇫🇮 Finnish
- 🇹🇷 Turkish
- 🇸🇦 Arabic
- 🇮🇱 Hebrew
- 🇮🇳 Hindi
More Languages
- 🇹🇭 Thai
- 🇻🇳 Vietnamese
- 🇮🇩 Indonesian
- 🇲🇾 Malay
- 🇬🇷 Greek
- 🇨🇿 Czech
- 🇭🇺 Hungarian
- 🇷🇴 Romanian
- 🇺🇦 Ukrainian
- 🇧🇬 Bulgarian
Configuration
Project-Level Settings
Configure default language and detection:
Language Settings:
Default Language: en
Supported Languages:
- en (English)
- es (Spanish)
- fr (French)
- de (German)
- ja (Japanese)
Detection:
Auto-detect: Yes
Detection Method: Browser preference
Fallback: English
UI Language:
Follow User: Yes
Override Available: YesEmbedding Model Selection
Choose appropriate embedding models:
Important: Select a multi-lingual embedding model for best results across languages.
Embedding Models:
Recommended Multi-lingual:
- text-embedding-3-large (OpenAI)
- multilingual-e5-large (Open Source)
- mxbai-embed-large (Mixedbread)
Configuration:
Model: text-embedding-3-large
Dimensions: 3072
Languages: All supported
Performance: OptimizedLanguage Detection
Automatic Detection
Ask0 automatically detects user language:
// Detection hierarchy
1. User explicit selection
2. Browser language preference
3. Previous conversation language
4. IP-based geolocation
5. Content analysis
6. Default language fallbackManual Language Setting
Users can manually select language:
// Set language via API
window.ask0.setLanguage('es');
// Or via widget UI
<select id="language-selector">
<option value="en">English</option>
<option value="es">Español</option>
<option value="fr">Français</option>
</select>Content Management
Multi-lingual Sources
Organize content by language:
Source Organization:
English Content:
- https://docs.example.com/en/
- https://help.example.com/en/
Spanish Content:
- https://docs.example.com/es/
- https://help.example.com/es/
French Content:
- https://docs.example.com/fr/
- https://help.example.com/fr/
Cross-lingual Matching: EnabledTranslation Strategies
Handle content in different languages:
Translation Handling:
Source Language: Multiple
Response Language: User's preferred
Strategy:
1. Search in user's language first
2. Fall back to English if needed
3. Translate response if necessary
4. Indicate translated content
Quality:
Use Native Content: Preferred
Machine Translation: As fallback
Translation Service: DeepL/GoogleResponse Configuration
Language-Specific Responses
Customize responses per language:
const responses = {
en: {
greeting: "Hi! How can I help you today?",
thinking: "Searching for answers...",
notFound: "I couldn't find an answer. Try rephrasing?",
feedback: "Was this helpful?"
},
es: {
greeting: "¡Hola! ¿Cómo puedo ayudarte hoy?",
thinking: "Buscando respuestas...",
notFound: "No encontré una respuesta. ¿Puedes reformular?",
feedback: "¿Fue útil esto?"
},
fr: {
greeting: "Bonjour! Comment puis-je vous aider?",
thinking: "Recherche de réponses...",
notFound: "Je n'ai pas trouvé de réponse. Reformulez?",
feedback: "Cela vous a-t-il été utile?"
}
};Cultural Adaptations
Adapt to cultural preferences:
Cultural Settings:
Date Format:
US: MM/DD/YYYY
EU: DD/MM/YYYY
ISO: YYYY-MM-DD
Time Format:
US: 12-hour with AM/PM
EU: 24-hour
Number Format:
US: 1,234.56
EU: 1.234,56
Currency:
US: $1,234.56
EU: 1.234,56 €
Tone:
Japanese: More formal
American: Casual friendly
German: Direct professionalWidget Localization
UI Translation
Translate widget interface:
// Widget localization
const widgetTranslations = {
en: {
placeholder: "Ask a question...",
send: "Send",
powered: "Powered by Ask0",
minimize: "Minimize",
expand: "Expand"
},
es: {
placeholder: "Haz una pregunta...",
send: "Enviar",
powered: "Desarrollado por Ask0",
minimize: "Minimizar",
expand: "Expandir"
},
// ... more languages
};RTL Support
Support right-to-left languages:
/* RTL languages (Arabic, Hebrew, etc.) */
[dir="rtl"] .ask0-widget {
direction: rtl;
text-align: right;
}
[dir="rtl"] .ask0-message {
flex-direction: row-reverse;
}
[dir="rtl"] .ask0-input {
padding-right: 40px;
padding-left: 10px;
}Search Optimization
Cross-lingual Search
Find content across languages:
Search Configuration:
Cross-lingual: Enabled
Matching:
Exact Language: Weight 1.0
English Fallback: Weight 0.8
Translated: Weight 0.6
Example:
Query: "como integrar API" (Spanish)
Results:
1. Spanish API guide (score: 0.95)
2. English API guide (score: 0.76)
3. French API guide (score: 0.62)Language-Specific Indexing
Optimize for each language:
Indexing Settings:
Tokenization:
English: Standard
Chinese: Character-based
Japanese: Morphological analysis
Arabic: Root-based
Stemming:
English: Porter stemmer
Spanish: Snowball stemmer
German: German stemmer
Stop Words:
Per language configurationAnalytics by Language
Language Metrics
Track performance per language:
Language Analytics:
Usage by Language:
English: 45% (12,345 conversations)
Spanish: 25% (6,789 conversations)
French: 15% (4,123 conversations)
German: 10% (2,741 conversations)
Other: 5% (1,369 conversations)
Satisfaction by Language:
English: 87% positive
Spanish: 82% positive
French: 85% positive
German: 90% positive
Response Quality:
English: 92% confidence
Spanish: 88% confidence
French: 86% confidence
German: 89% confidenceRegional Insights
Understand regional patterns:
Regional Patterns:
North America:
Languages: English (85%), Spanish (10%), French (5%)
Peak Hours: 9 AM - 5 PM EST
Common Topics: Pricing, Features
Europe:
Languages: English (40%), German (20%), French (15%)
Peak Hours: 9 AM - 5 PM CET
Common Topics: GDPR, Integration
Asia:
Languages: English (30%), Chinese (25%), Japanese (20%)
Peak Hours: 9 AM - 5 PM JST
Common Topics: API, TechnicalImplementation Guide
Basic Multi-lingual Setup
Choose Embedding Model
Select a multi-lingual embedding model in project settings
Configure Languages
Add supported languages and set detection preferences
Add Language-Specific Content
Upload or crawl content in different languages
Customize UI
Translate widget strings and messages
Test
Verify responses in each language
Advanced Configuration
// Advanced language configuration
const languageConfig = {
// Detection
detection: {
method: 'auto',
sources: ['browser', 'ip', 'user-preference'],
confidence_threshold: 0.8
},
// Supported languages with metadata
languages: {
en: {
name: 'English',
nativeName: 'English',
embedding_model: 'text-embedding-3-large',
response_style: 'casual'
},
es: {
name: 'Spanish',
nativeName: 'Español',
embedding_model: 'multilingual-e5-large',
response_style: 'formal'
}
},
// Translation fallback
translation: {
enabled: true,
service: 'deepl',
cache_translations: true,
quality: 'high'
}
};API Reference
Language Management API
// Set user language
await ask0.users.setLanguage('user_123', 'fr');
// Get available languages
const languages = await ask0.languages.list();
// Detect language from text
const detected = await ask0.languages.detect('Bonjour, comment allez-vous?');
// { language: 'fr', confidence: 0.98 }
// Translate content
const translated = await ask0.translate({
text: 'Hello, how are you?',
from: 'en',
to: 'es'
});
// { text: 'Hola, ¿cómo estás?', from: 'en', to: 'es' }
// Get language-specific analytics
const analytics = await ask0.analytics.byLanguage({
period: 'last_30_days'
});Best Practices
Multi-lingual Best Practices:
- Use native content when possible
- Choose appropriate embedding models
- Test responses in each language
- Monitor language-specific metrics
- Consider cultural differences
- Provide language switching options
- Maintain consistent quality across languages
Content Strategy
- Create native content for top languages
- Use professional translation for important content
- Maintain language parity for key features
- Regular review of translated content
- Consider regional variations (US vs UK English)
Performance Optimization
- Cache translations
- Pre-process multi-lingual content
- Use CDN for language-specific assets
- Optimize embedding model selection
- Monitor response times per language
Troubleshooting
Common Issues:
Poor response quality in non-English
- Switch to multi-lingual embedding model
- Add more native language content
- Adjust confidence thresholds
Wrong language detected
- Enable manual language selection
- Improve detection confidence threshold
- Check browser language settings
Mixed language responses
- Set strict language boundaries
- Improve source organization
- Configure translation preferences