Skip to content
Salatiel Queiroz
DibbbleLinkedIn

How to translate Strapi v4 Admin Panel

Strapi1 min read

To translate Strapi's V4 admin panel frontend first make sure you are running Strapi server using:
strapi develop --watch-admin command or else you'll need to run strapi build for every change.

I spent a good 30min until I found out this.

So, go to the file src/admin/app.js and add the translates that you need:

src/admin/app.js
1export default {
2 config: {
3 // others configs
4 locales: [
5 "pt-BR",
6 "fr"
7 ],
8 },
9};

But note that is not possible to remove the English en translation because is the Strapi Admin Panel fallback language.

Overwriting

To overwrite any existing translation add a translations key inside the config object with the translation key/value of the language. You can see all Strapi default translations here or inside your project's node_modules @strapi/admin/admin/src/translations/[language-name].json.

Here is an example to translate the Strapi navbar title and subtitle:

src/admin/app.js
1export default {
2 config: {
3 // others configs
4 locales: [
5 "pt-BR",
6 "fr"
7 ],
8 translations: {
9 "pt-BR": {
10 "app.components.LeftMenu.navbrand.title": "Painel Admin",
11 "app.components.LeftMenu.navbrand.workplace": "mywebsite.com",
12 },
13 fr: {
14 "app.components.LeftMenu.navbrand.title": "Panneau d'administration",
15 "app.components.LeftMenu.navbrand.workplace": "mywebsite.com",
16 },
17 },
18 },
19};

Result

After following the previous steps you will see language select at your profile page /admin/me and the login page.

Language select at Login page:

Result 1

Language select at Profile page:

Result 2

© 2024 by Salatiel Queiroz. All rights reserved.
Theme by LekoArts