Replies: 2 comments 2 replies
-
I think this should still work and would be my recommendation: https://next-intl.dev/docs/environments/actions-metadata-route-handlers#server-actions-zod There are different strategies though, you can also use built-in localization from zod if you prefer that. |
Beta Was this translation helpful? Give feedback.
0 replies
-
im using this to built-in localization from zod import * as z from "zod";
async function loadLocale(locale: string) {
const { default: locale } = await import(`zod/v4/locales/${locale}.js`);
z.config(locale());
};
// src/i18n/request.ts
await loadLocale(requestedLocale); but when try change locale the error messages still in english (default) |
Beta Was this translation helpful? Give feedback.
2 replies
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.
-
Zod 4 introduce new localized error messages
https://zod.dev/error-customization#locales
How to load custom error messages using zod 4 and next-intl
Beta Was this translation helpful? Give feedback.
All reactions