Icons & Translations
Use these methods inside setup to register icons and translations that your plugin’s UI depends on.
registerIcon
Registers an inline SVG icon by name. Use the name in registerSource or registerFileAction.
registerL10n
Adds translation strings used by the plugin’s labels and UI.
registerL10n accepts any key. In TypeScript, declare your keys by augmenting
CustomLocaleDefinition Since v1.37.0 so that your editor suggests them here and in labels. Built-in keys need no declaration:
A registered key can then be used as a label.
Keys registered here can be accessed via uploaderApi.l10n('my-source.label') for translated text. The current locale name is available via pluginApi.config.get('localeName'). Labels in registerSource, registerActivity and registerFileAction are looked up the same way. See Localization for the full list of built-in keys and locale definition format.