I want to use Chinese/Traditional as Yup default language?
I found some modules about
<a>
https://github.com/loicmahieu/yup-locales#readme
</a>
Are your theme support?
Hi Anthony,
Thank you for your question.
Unfortunately, at the moment we do not use yup-locales dependency in our theme, we are handling all translations using vue-i18n. We checked this dependency and it seems like it is a quite useful extension to translate yup default error messages, we will consider adding this extension in the next releases.
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Can you show me how to use vue-i18n to localize Yup with Chinese Traditional?
Hi,
Firstly, you will need to register your translation keys in file src/core/plugins/i18n.ts. You can follow our i18n docs: https://preview.keenthemes.com/metronic8/vue/docs/#/internationalization
Then in component you can import translation functions with useI18n.
const { t } = useI18n();
Yup.object({
accountType: Yup.string().required(t("account_required_message")).label(t("account_label")),
}),