You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i add backend option not found translation in express but zod translate zod found but when i remove resources option, translation it found. How can i fix it?
importi18nextfrom"i18next";importi18nextMiddlewarefrom"i18next-http-middleware";importi18nextBackendfrom"i18next-node-fs-backend";import{setErrorMap,z}from"zod";import{zodI18nMap}from"zod-i18n-map";importtranslationfrom"zod-i18n-map/locales/es/zod.json";importpathfrom"path";// lng and resources key depend on your locale.i18next.use(i18nextBackend).use(i18nextMiddleware.LanguageDetector).init({// debug: true,lng: "es-ES",fallbackLng: "en-US",preload: ["en-US","es-ES"],resources: {es: {zod: translation},},backend: {loadPath: path.resolve(__dirname,"..","lang","{{lng}}","{{ns}}.json"),},detection: {caches: ["cookie"],},});setErrorMap(zodI18nMap);
The text was updated successfully, but these errors were encountered:
When i add backend option not found translation in express but zod translate zod found but when i remove resources option, translation it found. How can i fix it?
The text was updated successfully, but these errors were encountered: