Can labels be changed to a different language?

The Pintura Image Editor module includes the en_gb locale files. Locale files for other languages are included in the product package.

We can set our own labels by updating label properties in the locale objects or by duplicating the locale files and translating the label values there.

import {
    openDefaultEditor,
    locale_en_gb,
    plugin_crop_locale_en_gb,
} from './pintura.js';

const locale = {
    ...locale_en_gb,
    ...plugin_crop_locale_en_gb,
};

locale.labelButtonExport = 'Save';

// set locale to the editor
openDefaultEditor({
    src: './my-image.jpeg',

    locale,
});