Skip to content

[FEATURE] Multilingual LLM Support — Internationalization and localization #473

Description

@gelluisaac

Description

Add comprehensive multilingual support for LLM features including automatic
translation, locale-specific prompts, and multi-language RAG.

Scope

Build i18n infrastructure for global LLM deployment.

Files to Touch/Create

  • astroml/llm/i18n/__init__.py
  • astroml/llm/i18n/translator.py — Translation service
  • astroml/llm/i18n/localizer.py — Content localization
  • astroml/llm/i18n/prompts/ — Translated prompt templates
  • astroml/llm/i18n/detector.py — Language detection
  • astroml/llm/i18n/validators.py — Locale-specific validation
  • api/middleware/i18n.py — Locale detection middleware
  • locales/ — Translation files

Supported Languages

  • English (primary)
  • Spanish, French, German, Portuguese
  • Chinese (Simplified/Traditional)
  • Japanese, Korean
  • Arabic, Hindi

Implementation Details

  • Automatic language detection from user input
  • Translated system prompts per locale
  • RAG index per language (or multilingual index)
  • Locale-specific evaluation datasets
  • Fallback to English for unsupported languages
  • Translation caching

Acceptance Criteria

  • Supports 10+ languages
  • Language detection accuracy >95%
  • Translation latency <200ms
  • Quality within 10% of English baseline
  • RAG retrieval works per language
  • Prompts culturally appropriate

Translation Strategy

  • Prompt templates: professional translation
  • Dynamic content: real-time translation via LLM
  • Mixed queries: detect and route appropriately

Labels

enhancement, llm, i18n, user-facing

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions