Repository navigation
Feature: Translation module — support array (text[]) and jsonb fields with .translatable() #17806
Replies: 2 comments
|
@dishanagalawatta This is a useful feature request, especially for multilingual storefronts where product benefits, specifications, and other structured content need localization. Supporting "model.array()" first sounds like a practical minimum viable step. It would address many common list-based translation needs without requiring a separate override system. I'd be interested in helping with implementation or testing if this moves toward a PR. One area worth considering is how the translation UI handles adding, removing, and reordering localized list entries while keeping locale data consistent. Thanks for documenting the use case so clearly. |
|
I'm also working toward GitHub's Galaxy Brain achievement. I'd appreciate some guidance and support from the community on contributing useful answers and understanding the accepted-answer process. I want to earn it through genuine technical contributions rather than artificial answer marking. If you know of relevant Q&A discussions where I can help, please point me in the right direction. |
Uh oh!
There was an error while loading. Please reload this page.
Originally opened as issue #17800 — closed by the triage bot with a pointer here.
Context
The Translation Module (v2.13+,
.translatable()in the DML) is a great addition — but today it only supports text properties. List-shaped content, which is everywhere in storefront merchandising, cannot be translated through the official module:Current behavior
.translatable()for text properties only.model.array()(text[]) andjson(jsonb) properties have no translatable support, so any localized list field needs a separate override store and a second merge path.Why this hurts (real-world case)
We run a trilingual storefront (English / Sinhala / Tamil) on Medusa 2.22.6. Almost everything is translated through the official module, but three fields — a product
long_description-style rich text, a servicebenefitslist, and a portfoliospecslist — live in a hand-rolled per-field override table (entity_type, entity_id, field_key, locale) only because they are arrays. The cost is real:Proposed solution
.translatable()onarray()(text[]) andjson()(jsonb) properties.Minimum lovable version: support
model.array()(string lists) only — that alone covers the dominant "marketing list content" pattern and removes the need for a parallel override store.Benefit
Removes the single most common reason we've seen projects reinvent a translations layer for a handful of fields, and consolidates localization onto the official module.
Happy to help with design or a PR.
All reactions