awake-maroonA
Refine3y ago
2 replies
awake-maroon

How to translate antd validation message?

Hi, I've set the i18n locale to Chinese, using the code below:
i18n
  .use(Backend)
  .use(initReactI18next)
  .init({
    supportedLngs: ['zh-CN'],
    backend: {
      loadPath: '/locales/{{lng}}/{{ns}}.json', // locale files path
    },
    defaultNS: 'common',
    fallbackLng: ['zh-CN'],
  })

How ever when I use ant design validation rules, the antd validation (required) message is still English. How can I translate these validatiion messages? (I assume that antd has built-in i18n system as well. How to use its i18n settings with refine.dev?)
Was this page helpful?