feat(i18n): Add Spanish (es-MX) locale support
- Dominant language
- TypeScript
- Stars
- 37.2k
- Forks
- 5.9k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 195
Description
## 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)
Contributor guide
Assessment
This issue has not been assessed yet.