Skip to content

feat: internationalization support (i18n — IT/EN) #127

@nikazzio

Description

@nikazzio

Summary

Add internationalization support to the Studio UI, starting with Italian (current default) and English.

Motivation

The UI is entirely in Italian. Adding English opens the project to an international audience of digital humanists, librarians, and researchers. The i18n infrastructure also enables future languages.

Proposed approach

  • Create a translation dict/JSON file per language: translations/it.json, translations/en.json.
  • Add a t(key) helper function available in all FastHTML/Jinja templates.
  • Store language preference in browser localStorage + optional config setting.
  • Language switcher in the header/settings.
  • Start with IT (current strings) and EN.

Acceptance criteria

  • All user-facing strings extracted to translation files
  • Language switcher in UI header
  • Italian and English fully translated
  • Language preference persisted across sessions
  • New strings default to Italian if translation is missing
  • Developer docs on how to add a new language

Technical notes

  • FastHTML approach: pass t function to template context, use t("key") in templates.
  • Alternative: use Python gettext if preferring standard tooling.
  • Keep translation keys as dotted paths: library.search.placeholder, studio.ocr.button, etc.
  • Consider a scripts/extract_strings.py helper to find untranslated hardcoded strings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreminorIncrements the minor version when adding new functionality in a backward-compatible manner.priority:P2Medium prioritystatus:readyReady to be implementedtype:featureNew user-facing feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions