Scheduling infrastructure for absolutely everyone.
fix: i18n for app router (#16909)
Benny Joo2146c0444421
diff --git a/apps/web/lib/app-providers-app-dir.tsx b/apps/web/lib/app-providers-app-dir.tsxindex cd7ce9eb086..463db38a700 100644--- a/apps/web/lib/app-providers-app-dir.tsx+++ b/apps/web/lib/app-providers-app-dir.tsx@@ -71,10 +71,12 @@ const CustomI18nextProvider = (props: { children: React.ReactElement; i18n?: SSR**/const session = useSession();- const locale =- session?.data?.user.locale ?? typeof window !== "undefined"- ? window.document.documentElement.lang || "en"+ const fallbackLocale =+ typeof window !== "undefined" && window.document.documentElement.lang+ ? window.document.documentElement.lang: "en";+ const newLocale = typeof window !== "undefined" && window.calNewLocale ? window.calNewLocale : null;+ const locale = session?.data?.user.locale ?? newLocale ?? fallbackLocale;useEffect(() => {try {