Skip to content

Conversation

@DarkSuniuM
Copy link
Contributor

What does it do?

Allows developer to extend packages/core/admin/admin/src/translations/languageNativeNames.js using languageNativeNames key admin config (src/admin/app.js)

Why is it needed?

Without this, extending translations for custom languages doesn't work.

How to test it?

Modify examples/getstarted/src/admin/app.js and put the following:

export default {
  config: {
    locales: ['fa'],
    languageNativeNames: {
      fa: 'فارسی',
    },
    translations: {
      fa: { 'Settings.profile.form.section.experience.interfaceLanguage': 'زبان رابط کاربری' },
    },
  },
  bootstrap() {},
};

Run the following command: yarn workspace getstarted develop --watch-admin

Open http://localhost:8000/admin/me in your browser, Set Interface Langauge to "فارسی", and Save.

The "Interface Language" title should change to "زبان رابط کاربری" which is defined in examples/getstarted/src/admin/app.js

@strapi-cla
Copy link

strapi-cla commented Apr 8, 2022

CLA assistant check
All committers have signed the CLA.

@strapi-bot
Copy link

This pull request has been mentioned on Strapi Community Forum. There might be relevant details there:

https://forum.strapi.io/t/unable-to-add-a-new-language-for-the-admin-ui/14251/7

@soupette soupette added the flag: don't merge This PR should not be merged at the moment label Apr 11, 2022
@DarkSuniuM DarkSuniuM closed this Apr 12, 2022
@DarkSuniuM DarkSuniuM deleted the feat/customize-language-names-admin-ui branch April 12, 2022 20:18
@shestakov-vladyslav
Copy link

Good thing

@DarkSuniuM
Copy link
Contributor Author

Good thing

This PR had some issues which I'll fix later

@pimpelsang
Copy link

So what happened to it?

@EmanuilGerganov
Copy link

How to add a new language to Strapi admin panel?

1 similar comment
@AleksiupasSameSystem
Copy link

How to add a new language to Strapi admin panel?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flag: don't merge This PR should not be merged at the moment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants