Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions docs/developer-docs/latest/development/admin-customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,56 @@ export default {
</code-block>
</code-group>

A plugin's key/value pairs are declared independently in the plugin's files at `./admin/src/translations/[language-name].json`. These key/value pairs can similarly be extended in the `config.translations` key by prefixing the key with the plugin's name (i.e. `[plugin name].[key]: 'value'`) as in the following example:

<code-group>
<code-block title="JAVASCRIPT">

```js
// path: ./my-app/src/admin/app.js

export default {
config: {
locales: ['fr'],
translations: {
fr: {
'Auth.form.email.label': 'test',
// Translate a plugin's key/value pair by adding the plugin's name as a prefix
// In this case, we translate the "plugin.name" key of plugin "content-type-builder"
"content-type-builder.plugin.name": "Constructeur de Type-Contenu",
},
},
},
bootstrap() {},
};
```

</code-block>

<code-block title="TYPESCRIPT">


```js
// path: ./my-app/src/admin/app.ts

export default {
config: {
locales: ['fr'],
translations: {
fr: {
'Auth.form.email.label': 'test',
// Translate a plugin's key/value pair by adding the plugin's name as a prefix
// In this case, we translate the "plugin.name" key of plugin "content-type-builder"
"content-type-builder.plugin.name": "Constructeur de Type-Contenu",
},
},
},
bootstrap() {},
};
```

</code-block>
</code-group>


If more translations files should be added, place them in `./src/admin/extensions/translations` folder.
Expand Down