V3 plugin translation

System Information
  • Strapi Version: 3.6.8
  • Operating System: Linux
  • Database: SQLite
  • Node Version: 14
  • NPM Version:
  • Yarn Version:

Hey,

I am writing a custom plugin and started making use of FormattedMessage. I put my translations in the plugin admin/scr/translations folder, but they don’t get picked up. Only if i move the values into the general strapi-admin they’d work.

Is this by design? I’d rather have each separated, and this is how it seems the plugin is registered with translations:

admin/src/index.js

const plugin = {
    blockerComponent: null,
    blockerComponentProps: {},
    ....
    trads, <------------------
    menu: {
      pluginsSectionLinks: [
        {
          destination: `/plugins/${pluginId}`,

1 Like

For future readers who are, like myself, new to Strapi (v3), plugin translation will work by prepending the plugin name, like so:

<FormattedMessage id={${pluginId}.CustomString.substring} />