Skip to content

Add i18n/localization agent for API response messages #46

@PAMulligan

Description

@PAMulligan

Description

Create a new agent that helps implement internationalization (i18n) for API error messages, validation messages, and user-facing content.

Why

APIs serving global audiences need localized error messages and validation responses. An i18n agent provides patterns for extracting translatable strings, organizing locale files, and selecting the correct language based on the `Accept-Language` header.

Acceptance Criteria

  • Create `.claude/agents/i18n-localizer.md`
  • Agent should help with:
    • Setting up locale files (JSON-based, one per language)
    • Creating a translation middleware that reads `Accept-Language` header
    • Extracting hardcoded strings into translation keys
    • Generating Zod error message overrides per locale
    • Fallback language configuration
  • Include common translation patterns for API responses:
    • Validation errors (`"Email is required"` → `validation.email.required`)
    • Auth errors (`"Invalid credentials"` → `auth.invalid_credentials`)
    • Not found errors (`"User not found"` → `resource.not_found`)
  • Add agent to the CUSTOM-AGENTS-GUIDE.md catalog
  • CI passes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions