Skip to content

feat(i18n): Add Spanish (es-MX) locale support #279

@ellaguno

Description

@ellaguno

Feature Request

Description

Add complete Spanish (Mexican Spanish, es-MX) locale support for the OpenMAIC platform, including:

  1. UI translations — All user-facing strings translated to Spanish across all 5 i18n modules (common, stage, chat, generation, settings)
  2. Language selector — Spanish option added to the header language picker
  3. Browser auto-detection — Automatic detection of Spanish-speaking browsers
  4. Content generation — Support for generating courses in Spanish (es-MX added to generation pipeline types)

Motivation

OpenMAIC is a powerful educational platform, and adding Spanish support would make it accessible to ~500M+ Spanish speakers worldwide. This is especially relevant for schools and educational institutions in Latin America and Spain.

Implementation

  • Follows the existing i18n architecture (TypeScript constants with useI18n hook)
  • No new dependencies required
  • All existing patterns preserved (same key structure as zh-CN and en-US)
  • Voice/TTS/ASR already support Spanish through existing providers (OpenAI, Azure, Qwen, ElevenLabs)

Changes

  • lib/i18n/types.ts — Added 'es-MX' to Locale type
  • lib/i18n/*.ts — Added *EsMX translation constants (5 files)
  • lib/i18n/index.ts — Registered es-MX translations
  • lib/hooks/use-i18n.tsx — Updated detection and validation
  • components/header.tsx — Added ES option to language selector
  • components/generation/generation-toolbar.tsx — 3-language cycle for content generation
  • app/page.tsx — Updated form state and browser detection
  • lib/types/generation.ts — Updated language union types
  • lib/server/classroom-generation.ts — Updated normalizeLanguage()
  • lib/generation/scene-generator.ts — Updated language parameter type
  • app/api/generate/scene-content/route.ts — Updated language cast

🤖 AI-assisted (Claude Code)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions