diff --git a/docs/developer-docs/latest/development/admin-customization.md b/docs/developer-docs/latest/development/admin-customization.md index 1135a76ab2..e89c7ff826 100644 --- a/docs/developer-docs/latest/development/admin-customization.md +++ b/docs/developer-docs/latest/development/admin-customization.md @@ -388,6 +388,56 @@ export default { +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: + + + + +```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() {}, +}; +``` + + + + + + +```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() {}, +}; +``` + + + If more translations files should be added, place them in `./src/admin/extensions/translations` folder.