multilingual-support

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Multilingual Support

多语言支持

You are an expert in building multilingual capabilities for sales bots. Your goal is to help developers create systems that detect language, respond appropriately, and route conversations effectively.
您是为销售机器人构建多语言功能的专家。您的目标是帮助开发者创建能够检测语言、做出恰当响应并有效转接对话的系统。

Language Detection

语言检测

Detection Methods

检测方法

Message Analysis
Analyze incoming message:
- Character set (Latin, Cyrillic, CJK, etc.)
- Common words/patterns
- Language-specific characters (ñ, ü, ç)
- Statistical language models

Confidence scoring:
- High (90%+): Respond in detected language
- Medium (70-90%): Respond in detected, offer alternative
- Low (<70%): Clarify with prospect
Contextual Signals
Other indicators:
- Phone number country code
- Email domain (.fr, .de, .jp)
- IP geolocation
- Prior interactions
- Account settings
- Browser language
消息分析
Analyze incoming message:
- Character set (Latin, Cyrillic, CJK, etc.)
- Common words/patterns
- Language-specific characters (ñ, ü, ç)
- Statistical language models

Confidence scoring:
- High (90%+): Respond in detected language
- Medium (70-90%): Respond in detected, offer alternative
- Low (<70%): Clarify with prospect
上下文信号
Other indicators:
- Phone number country code
- Email domain (.fr, .de, .jp)
- IP geolocation
- Prior interactions
- Account settings
- Browser language

Common Detection Challenges

常见检测挑战

Challenge: Similar languages
Spanish vs Portuguese
Dutch vs Afrikaans
Solution: Look for distinctive patterns

Challenge: Code-switching
"I need the pricing por favor"
Solution: Detect primary language, accommodate mixing

Challenge: Transliteration
"Mne nuzhna pomoshch" (Russian in Latin)
Solution: Detect and offer native script

Challenge: English used by non-native
Grammatical patterns may reveal native language
Solution: Consider offering native language option
Challenge: Similar languages
Spanish vs Portuguese
Dutch vs Afrikaans
Solution: Look for distinctive patterns

Challenge: Code-switching
"I need the pricing por favor"
Solution: Detect primary language, accommodate mixing

Challenge: Transliteration
"Mne nuzhna pomoshch" (Russian in Latin)
Solution: Detect and offer native script

Challenge: English used by non-native
Grammatical patterns may reveal native language
Solution: Consider offering native language option

Response Strategies

响应策略

Native Language Response

母语响应

If confident in detection and capability exists:

Prospect: "Bonjour, j'ai besoin d'information sur vos prix"

Bot: "Bonjour ! Je serais ravi de vous aider avec nos tarifs.
Pouvez-vous me dire quelle est la taille de votre équipe ?"
If confident in detection and capability exists:

Prospect: "Bonjour, j'ai besoin d'information sur vos prix"

Bot: "Bonjour ! Je serais ravi de vous aider avec nos tarifs.
Pouvez-vous me dire quelle est la taille de votre équipe ?"

Hybrid Response

混合响应

When confidence is medium:

Bot: "Je vois que vous parlez français ! Je peux continuer
en français ou en anglais—quelle est votre préférence?

I see you're writing in French! I can continue in French
or English—what's your preference?"
When confidence is medium:

Bot: "Je vois que vous parlez français ! Je peux continuer
en français ou en anglais—quelle est votre préférence?

I see you're writing in French! I can continue in French
or English—what's your preference?"

Routing Response

转接响应

When no capability in that language:

Bot: "I noticed you're writing in German. Let me connect
you with a colleague who speaks German fluently.

Ich habe bemerkt, dass Sie auf Deutsch schreiben.
Lassen Sie mich Sie mit einem deutschsprachigen
Kollegen verbinden."
When no capability in that language:

Bot: "I noticed you're writing in German. Let me connect
you with a colleague who speaks German fluently.

Ich habe bemerkt, dass Sie auf Deutsch schreiben.
Lassen Sie mich Sie mit einem deutschsprachigen
Kollegen verbinden."

Language Capability Matrix

语言能力矩阵

Define Your Coverage

定义覆盖范围

Language       | Bot      | Human     | Materials
               | Support  | Available | Available
───────────────|──────────|───────────|──────────
English        | Full     | Yes       | Yes
Spanish        | Full     | Yes       | Yes
French         | Full     | Yes       | Partial
German         | Partial  | Yes       | Yes
Portuguese     | Routing  | Limited   | No
Mandarin       | Routing  | Yes       | Yes
Japanese       | Routing  | Limited   | Partial
Arabic         | No       | Limited   | No
Language       | Bot      | Human     | Materials
               | Support  | Available | Available
───────────────|──────────|───────────|──────────
English        | Full     | Yes       | Yes
Spanish        | Full     | Yes       | Yes
French         | Full     | Yes       | Partial
German         | Partial  | Yes       | Yes
Portuguese     | Routing  | Limited   | No
Mandarin       | Routing  | Yes       | Yes
Japanese       | Routing  | Limited   | Partial
Arabic         | No       | Limited   | No

Capability Levels

能力等级

FULL: Bot can handle entire conversation
- Qualification
- Objection handling
- Scheduling
- Complex queries

PARTIAL: Bot handles basics, escalates complexity
- Initial greeting
- Simple Q&A
- Collecting information
- Routing to human

ROUTING: Detect and route only
- Language detection
- Polite acknowledgment
- Immediate handoff
FULL: Bot can handle entire conversation
- Qualification
- Objection handling
- Scheduling
- Complex queries

PARTIAL: Bot handles basics, escalates complexity
- Initial greeting
- Simple Q&A
- Collecting information
- Routing to human

ROUTING: Detect and route only
- Language detection
- Polite acknowledgment
- Immediate handoff

Conversation Handoff

对话转接

Warm Transfer

暖转接

When routing to human:

To prospect:
"Je vous mets en contact avec Marie, qui pourra vous
aider en français. Un instant s'il vous plaît."

To human rep (in internal system):
"Incoming: French-speaking prospect from Paris
Context: Interested in Enterprise plan
Initial need: Pricing for 50-person team
Sentiment: Positive, engaged"
When routing to human:

To prospect:
"Je vous mets en contact avec Marie, qui pourra vous
aider en français. Un instant s'il vous plaît."

To human rep (in internal system):
"Incoming: French-speaking prospect from Paris
Context: Interested in Enterprise plan
Initial need: Pricing for 50-person team
Sentiment: Positive, engaged"

Async Handoff

异步转接

When no human immediately available:

"Thank you for reaching out! I noticed you're more
comfortable in Spanish.

Our Spanish-speaking team member will reach out within
[timeframe]. In the meantime, is there anything I can
help with in English?

Gracias por contactarnos. He notado que prefiere
comunicarse en español. Un miembro de nuestro equipo
que habla español se pondrá en contacto con usted
dentro de [plazo]."
When no human immediately available:

"Thank you for reaching out! I noticed you're more
comfortable in Spanish.

Our Spanish-speaking team member will reach out within
[timeframe]. In the meantime, is there anything I can
help with in English?

Gracias por contactarnos. He notado que prefiere
comunicarse en español. Un miembro de nuestro equipo
que habla español se pondrá en contacto con usted
dentro de [plazo]."

Content Management

内容管理

Localized Responses

本地化响应

Store responses per language:

greeting:
  en: "Hi! How can I help you today?"
  es: "¡Hola! ¿Cómo puedo ayudarte hoy?"
  fr: "Bonjour ! Comment puis-je vous aider ?"
  de: "Hallo! Wie kann ich Ihnen helfen?"

qualification_question:
  en: "How many people are on your team?"
  es: "¿Cuántas personas hay en tu equipo?"
  fr: "Combien de personnes composent votre équipe ?"
  de: "Wie viele Personen sind in Ihrem Team?"
Store responses per language:

greeting:
  en: "Hi! How can I help you today?"
  es: "¡Hola! ¿Cómo puedo ayudarte hoy?"
  fr: "Bonjour ! Comment puis-je vous aider ?"
  de: "Hallo! Wie kann ich Ihnen helfen?"

qualification_question:
  en: "How many people are on your team?"
  es: "¿Cuántas personas hay en tu equipo?"
  fr: "Combien de personnes composent votre équipe ?"
  de: "Wie viele Personen sind in Ihrem Team?"

Dynamic Translation

动态翻译

For languages without full coverage:

1. Translate incoming message to English
2. Process in English
3. Generate response in English
4. Translate response to target language
5. Human review for quality (async)

Flag for human review:
- Complex topics
- Nuanced communication
- Legal/contractual language
- Cultural considerations
For languages without full coverage:

1. Translate incoming message to English
2. Process in English
3. Generate response in English
4. Translate response to target language
5. Human review for quality (async)

Flag for human review:
- Complex topics
- Nuanced communication
- Legal/contractual language
- Cultural considerations

Cultural Considerations

文化考量

Beyond Translation

超越翻译

Adapt for culture:

Formality levels:
- German: More formal (Sie vs du)
- Spanish: Varies by region (usted vs tú)
- Japanese: Multiple politeness levels

Business norms:
- US: Get to the point quickly
- Japan: Relationship building first
- Germany: Precision and detail valued
- Brazil: Warmth and rapport important

Time references:
- Dates: MM/DD vs DD/MM vs YYYY-MM-DD
- Time: 12h vs 24h
- Week start: Sunday vs Monday
Adapt for culture:

Formality levels:
- German: More formal (Sie vs du)
- Spanish: Varies by region (usted vs tú)
- Japanese: Multiple politeness levels

Business norms:
- US: Get to the point quickly
- Japan: Relationship building first
- Germany: Precision and detail valued
- Brazil: Warmth and rapport important

Time references:
- Dates: MM/DD vs DD/MM vs YYYY-MM-DD
- Time: 12h vs 24h
- Week start: Sunday vs Monday

Regional Variations

地区差异

Spanish:
- Spain: "ordenador" (computer)
- LatAm: "computadora"
- Currency, date formats vary

Portuguese:
- Brazil: Different vocabulary, spelling
- Portugal: More formal constructions

Chinese:
- Simplified (Mainland)
- Traditional (Taiwan, Hong Kong)
Spanish:
- Spain: "ordenador" (computer)
- LatAm: "computadora"
- Currency, date formats vary

Portuguese:
- Brazil: Different vocabulary, spelling
- Portugal: More formal constructions

Chinese:
- Simplified (Mainland)
- Traditional (Taiwan, Hong Kong)

Implementation

实现方案

Language Preference Storage

语言偏好存储

json
{
  "prospect_id": "12345",
  "language_preferences": {
    "detected_language": "es",
    "confirmed_preference": "es",
    "secondary_language": "en",
    "region": "MX",
    "formality": "informal"
  },
  "routing_preference": {
    "preferred_rep_language": "es",
    "acceptable_languages": ["es", "en"],
    "timezone": "America/Mexico_City"
  }
}
json
{
  "prospect_id": "12345",
  "language_preferences": {
    "detected_language": "es",
    "confirmed_preference": "es",
    "secondary_language": "en",
    "region": "MX",
    "formality": "informal"
  },
  "routing_preference": {
    "preferred_rep_language": "es",
    "acceptable_languages": ["es", "en"],
    "timezone": "America/Mexico_City"
  }
}

Detection Flow

检测流程

python
def handle_message(message, prospect):
    # Detect language
    detected = detect_language(message.text)

    # Check against preference
    if prospect.language_preference:
        language = prospect.language_preference
    else:
        language = detected.language
        confidence = detected.confidence

        if confidence < 0.8:
            return clarify_language_preference()

    # Check capability
    if can_handle(language):
        return generate_response(message, language)
    elif can_route(language):
        return route_to_team(message, language)
    else:
        return offer_alternatives(language)
python
def handle_message(message, prospect):
    # Detect language
    detected = detect_language(message.text)

    # Check against preference
    if prospect.language_preference:
        language = prospect.language_preference
    else:
        language = detected.language
        confidence = detected.confidence

        if confidence < 0.8:
            return clarify_language_preference()

    # Check capability
    if can_handle(language):
        return generate_response(message, language)
    elif can_route(language):
        return route_to_team(message, language)
    else:
        return offer_alternatives(language)

Quality Assurance

质量保障

Monitor:
- Detection accuracy
- Response quality per language
- CSAT scores by language
- Routing accuracy
- Time to qualified human (if routed)

Improve:
- Review misdetections
- Train on new patterns
- Add language coverage
- Localize more content
Monitor:
- Detection accuracy
- Response quality per language
- CSAT scores by language
- Routing accuracy
- Time to qualified human (if routed)

Improve:
- Review misdetections
- Train on new patterns
- Add language coverage
- Localize more content