Skip to content

Zod v4 internationalization #619

@fr33bits

Description

@fr33bits

I have been unable to get Zod error messages in a language other than English to show up in Superforms. In v4 Zod has added native internationalization support however it seems that setting the locale for Zod does not set it for Superforms as well. Or maybe it is supported and I just have not been able to get it working? 🤷

Ideally Superforms would get the error message locale from the general Zod config or, optionally, allow the user to select a locale through a function parameter for instance.

That said, the native Zod implementation is also flawed in that it only allows the setting of the locale globally and not on the level of each parse. zod-i18n-map also doesn't support Zod v4 yet and there hasn't really been any activity for a year and a half.

Metadata

Metadata

Assignees

No one assigned

    Labels

    adapterRelated to validation adaptersdocumentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions