Replies: 1 comment 1 reply
-
You can use const formTexts = t('namespace:form', { count: 150 }, { returnObjects: true })
console.log(formTexts.required) // This is required
console.log(formTexts.maxLength) // Max 150 characters And the namespace should be as: {
"form": {
"required": "This is required",
"maxLength": "Max {{count}} characters"
// ...
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to internationalize form validation, to do that I need to provide a config that looks like below
and I have the config in different locales
Currently in App I do
Is there a way to do something like below?
or any recommended way to achieve this?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions