Skip to content

feat: Multi-language campaign content with auto-translation #753

Description

@dotunv

Overview

Allow campaign creators to provide translated versions of their campaign content, and let contributors view campaigns in their preferred language using the existing i18n infrastructure.

Motivation

CrowdPay already supports en/fr UI translations, but campaign content (title, description, milestones) is always in the creator's language. This limits reach in multilingual regions where contributors might skip campaigns they cannot read.

Proposed Design

  1. Add a campaign_translations table: campaign_id, locale, title, description, milestone_titles
  2. Campaign creation/edit form gets a "Add Translation" button per supported locale
  3. Creators can optionally add translations; if none exist, original content is shown
  4. Contributor UI respects their locale setting and shows translated content when available
  5. Falls back to original language if translation is missing for the contributor's locale
  6. API: GET /api/campaigns/:id?locale=fr returns translated fields when available

Acceptance Criteria

  • Campaign edit form supports adding translations for each supported locale
  • Translations are stored in a separate table (not modifying original content)
  • API returns translated fields when locale query param matches an available translation
  • API falls back to original language when translation is unavailable
  • Campaign page renders in contributor's preferred language
  • Missing translations do not break the campaign page
  • Translations can be added after campaign launch
  • Unit tests cover translation retrieval, fallback, and locale matching

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programbackendBackend / API workenhancementNew feature or requestfrontendFrontend / UI work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions