Back to Resume Matcher

Internationalization (i18n)

docs/agent/features/i18n.md

1.2.01.8 KB
Original Source

Internationalization (i18n)

Multi-language UI and content generation.

Supported Languages

CodeLanguageNative Name
enEnglishEnglish
esSpanishEspañol
zhChinese (Simplified)中文
jaJapanese日本語

Two Language Settings

  1. UI Language - Interface text (buttons, labels, navigation)
  2. Content Language - LLM-generated content (resumes, cover letters)

Both are configured independently in the Settings page.

How It Works

  • UI translations: Simple JSON import approach, no external dependencies
  • Content generation: Backend receives language, passes to LLM prompts via {output_language}
  • Existing content in database remains in original language

Key Files

FilePurpose
apps/frontend/messages/*.jsonUI translation files (en, es, zh, ja)
apps/frontend/lib/i18n/translations.tsuseTranslations hook
apps/frontend/lib/context/language-context.tsxLanguageProvider (UI + content)
apps/backend/app/prompts/templates.pyLLM prompts with {output_language}

Using Translations

typescript
import { useTranslations } from '@/lib/i18n';

const { t } = useTranslations();
<button>{t('common.save')}</button>

Storage

KeyPurpose
resume_matcher_ui_languageUI language (localStorage only)
resume_matcher_content_languageContent language (localStorage + backend)

Adding a New Language

  1. Create apps/frontend/messages/{code}.json with all translations
  2. Add locale to apps/frontend/i18n/config.ts
  3. Add language name to apps/backend/app/prompts/templates.py
  4. Update SUPPORTED_LANGUAGES in backend config router