I18n constructor

const I18n({
  1. I18nLayerInteraction layerInteraction = const I18nLayerInteraction(),
  2. I18nPaintingEditor paintEditor = const I18nPaintingEditor(),
  3. I18nTextEditor textEditor = const I18nTextEditor(),
  4. I18nCropRotateEditor cropRotateEditor = const I18nCropRotateEditor(),
  5. I18nTuneEditor tuneEditor = const I18nTuneEditor(),
  6. I18nFilterEditor filterEditor = const I18nFilterEditor(),
  7. I18nBlurEditor blurEditor = const I18nBlurEditor(),
  8. I18nEmojiEditor emojiEditor = const I18nEmojiEditor(),
  9. I18nStickerEditor stickerEditor = const I18nStickerEditor(),
  10. I18nVarious various = const I18nVarious(),
  11. String importStateHistoryMsg = 'Initialize Editor',
  12. String cancel = 'Cancel',
  13. String undo = 'Undo',
  14. String redo = 'Redo',
  15. String done = 'Done',
  16. String remove = 'Remove',
  17. String doneLoadingMsg = 'Changes are being applied',
})

Creates an instance of I18n with customizable internationalization settings.

You can provide translations and messages for various components of the Image Editor by specifying the corresponding I18n subclasses. If a specific translation is not provided, default values will be used.

The cancel, undo, redo, and done parameters allow you to specify the text for the respective buttons in the Image Editor interface.

The doneLoadingMsg parameter is used to display a message while changes are being applied.

Example:

I18n(
  various: I18nVarious(
    // Custom translations and settings for various components
  ),
  paintEditor: I18nPaintingEditor(
    // Custom translations and settings for the Painting Editor
  ),
  textEditor: I18nTextEditor(
    // Custom translations and settings for the Text Editor
  ),
  // Additional settings for other components...
  cancel: 'Cancel',
  undo: 'Undo',
  redo: 'Redo',
  done: 'Done',
  remove: 'Remove',
  doneLoadingMsg: 'Changes are being applied',
)

Implementation

const I18n({
  this.layerInteraction = const I18nLayerInteraction(),
  this.paintEditor = const I18nPaintingEditor(),
  this.textEditor = const I18nTextEditor(),
  this.cropRotateEditor = const I18nCropRotateEditor(),
  this.tuneEditor = const I18nTuneEditor(),
  this.filterEditor = const I18nFilterEditor(),
  this.blurEditor = const I18nBlurEditor(),
  this.emojiEditor = const I18nEmojiEditor(),
  this.stickerEditor = const I18nStickerEditor(),
  this.various = const I18nVarious(),
  this.importStateHistoryMsg = 'Initialize Editor',
  this.cancel = 'Cancel',
  this.undo = 'Undo',
  this.redo = 'Redo',
  this.done = 'Done',
  this.remove = 'Remove',
  this.doneLoadingMsg = 'Changes are being applied',
});