Skip to content

(feat) Alt Text Localization#271

Open
LucaArgentieri wants to merge 2 commits intosanity-io:mainfrom
LucaArgentieri:main
Open

(feat) Alt Text Localization#271
LucaArgentieri wants to merge 2 commits intosanity-io:mainfrom
LucaArgentieri:main

Conversation

@LucaArgentieri
Copy link
Copy Markdown

@LucaArgentieri LucaArgentieri commented Jan 17, 2026

Description

This PR adds full support for localized asset fields in the media plugin, following Sanity's recommended localization scheme. Now, if a locale array is provided in the plugin config, all localizable fields (title, altText, description, creditLine) are shown in language-specific tabs, allowing editors to enter translations for each language. The implementation is compatible with objects containing extra keys (e.g. isDefault), but only id and title are used internally.

Cattura

What to review

  • The new tabbed UI for localized fields in the asset edit dialog.
  • The dynamic schema and form logic for handling both localized and non-localized setups.
  • TypeScript compatibility with extended locale objects.
  • Documentation updates, including usage, config, and fallback handling.

Testing

  • Manual testing with various locales arrays (including with extra keys like isDefault).
  • Verified that fields are grouped by language in tabs and fallback logic is left to the user (with a GROQ example in the README).
  • No automated tests were added, but the changes are isolated to the plugin’s asset field handling and UI.

Closes #265

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 17, 2026

@LucaArgentieri is attempting to deploy a commit to the Sanity Sandbox Team on Vercel.

A member of the Team first needs to authorize it.

@evertharmeling
Copy link
Copy Markdown

Nice work @LucaArgentieri! It would be very nice if this functionality could be merged.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alt Text Localization

2 participants