Skip to content

Add multi-language support for Gradio UI #419

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

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

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

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions