Jmix 2.8+ add-on

Jmix LocalizedString Datatype

Locale-aware entity text for Jmix apps. Store multilingual values as one attribute, edit them in Flow UI, validate every locale, and sort by the current user's language.

build.gradle
implementation 'com.glebfox.jmix.locstr:jmix-localized-string-datatype-starter:1.1.0'
Datatype Flow UI action Bean Validation Locale-aware sorting
Datatype Custom Jmix datatype backed by JSON storage
Flow UI Localized editor action for ValuePicker
Validation Bean Validation constraints per locale
Sorting Database and in-memory locale-aware sorting
What it solves

Multilingual entity fields without custom screens for every project.

01

Use one domain type

Add a LocalizedString attribute to your entity and keep every locale together in one Jmix datatype.

02

Edit all locales in place

Attach value_localizedStringEdit to a ValuePicker and open a focused dialog for localized values.

03

Respect the user locale

Components display the value that matches the current locale, with sorting for list views and data containers.

Install

Add the starter dependency and keep using normal Jmix entities.

build.gradle
implementation 'com.glebfox.jmix.locstr:jmix-localized-string-datatype-starter:1.1.0'
JmixAdd-onArtifact
2.8.0+1.1.0starter
2.3.0+1.0.0starter
Flow UI editor

A localized editor that feels native to Jmix screens.

The add-on provides a ready-to-use action for ValuePicker. It switches between compact and multiline fields, checks unsaved changes, and accepts custom validators or field providers for richer input.

view.xml
<valuePicker id="nameField" property="name">
    <actions>
        <action id="localizedStringEdit" type="value_localizedStringEdit"/>
        <action id="clear" type="value_clear"/>
    </actions>
</valuePicker>
LocalizedString edit dialog in a Jmix Flow UI view
Validation

Validate every localized value before saving.

Required values

Use @LocalizedStringNotNull, @LocalizedStringNotEmpty, or @LocalizedStringNotBlank to enforce locale coverage.

Length and pattern rules

Apply @LocalizedStringSize, @LocalizedStringLength, and @LocalizedStringPattern to each localized value.

Custom field behavior

Install validators or a field provider to customize the edit dialog while keeping the same entity attribute model.

Screenshots

Real add-on behavior in a Jmix application.

Product list displaying English localized values
Locale-specific display values
Product list displaying Russian localized values
Same data, different user locale
Jmix Studio attribute datatype selector with LocalizedString selected
Studio datatype selection
LocalizedString editor with multiline fields
Multiline editing
LocalizedString editor showing required field validation
Required locale fields
LocalizedString editor using a custom rich text field provider
Custom field providers
Storage model

Database state stays simple.

Localized values are stored as JSON in one column, for example {"en":"Keyboard","de":"Tastatur"}. Filtering by this datatype is intentionally limited: Jmix GenericFilter and PropertyFilter do not support it.