Skip to content

Add multi-language support for Gradio UI #419

@dreamlessx

Description

@dreamlessx

What

Add internationalization (i18n) to the Gradio web demo so the interface can display in multiple languages.

Why

Facial surgery consultation is global. Supporting Spanish, Mandarin, Portuguese, Korean, and other languages makes the tool accessible to a wider clinical audience.

Suggested approach

  1. Create a translations/ directory with JSON files per language (e.g., en.json, es.json, zh.json)
  2. Add a language dropdown to the Gradio interface
  3. Load UI strings from the selected translation file
  4. Start with English and one other language; community can add more

Example structure

// translations/en.json
{
  "title": "LandmarkDiff - Surgical Outcome Prediction",
  "upload_prompt": "Upload a frontal face photo",
  "procedure_label": "Select procedure",
  "intensity_label": "Intensity (%)",
  "generate_button": "Generate Prediction",
  "result_label": "Predicted Result"
}

Difficulty: 🟢 Beginner — no ML knowledge needed, good for frontend contributors

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributingGood for community contributorsenhancementNew feature or requestgood first issueGood for newcomersuxUser experience

    Projects

    Status

    Todo

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions