Skip to content

[v4] Does localizing field names only work for <Field>? #4138

Answered by logaretm
1Luc1 asked this question in Q&A
Discussion options

You must be logged in to vote

You can pass the label in the field options in the third argument of useField.

const { t } = useI18n();
const forename = useField("forename", "required", { label: t('forename') });

<Field /> is just using useField under the hood with some nice behavioral addons, so most options still apply to useField.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@1Luc1
Comment options

@logaretm
Comment options

@1Luc1
Comment options

Answer selected by 1Luc1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants