Closed calicoder77 closed 1 year ago
I'm not sure I understand the question, the method accepts an object of messages not a string
I'm not sure I understand the question, the method accepts an object of messages not a string
Good afternoon @jquense, I have multiple language codes (en, fr, sp, it, etc...)
and I see that the Yup setLocale()
method requires a LocaleObject
parameter passed to it. I'm just wondering how to convert that language code string to a LocaleObject
so I can feed it to setLocale()
?
Is there a method in the Yup package that does that for example as I took a look at the docs and don't see it mentioned.
Ah no we don't include other translations besides English, you need to provide the translated strings or whatever. There is a simple example of how you might want to do that in the docs https://github.com/jquense/yup#localization-and-i18n but it's up to you
Good day,
I have the following code and was wondering how I can transform a string value like
en
into ayup.LocaleObject
type so I can insert it into asetLocale()
call? Appreciate any tips and help, thanks