diff --git a/next-env.d.ts b/next-env.d.ts
index 9bc3dd46b9..4f11a03dc6 100644
--- a/next-env.d.ts
+++ b/next-env.d.ts
@@ -1,5 +1,4 @@
///
-///
///
// NOTE: This file should not be edited
diff --git a/next.config.js b/next.config.js
index 8297fc508c..c0ea5df042 100644
--- a/next.config.js
+++ b/next.config.js
@@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const withTM = require("@vercel/edge-functions-ui/transpile")(["react-timezone-select"]);
+const path = require("path");
// So we can test deploy previews preview
if (process.env.VERCEL_URL && !process.env.BASE_URL) {
@@ -61,6 +62,12 @@ module.exports = () => plugins.reduce((acc, next) => next(acc), {
typescript: {
ignoreBuildErrors: true,
},
+ i18n: {
+ defaultLocale: "default",
+ localeDetection: false,
+ locales: ["default", "en", "fr", "it", "ru", "es", "de", "pt", "ro", "nl", "pt-BR", "es-419", "ko", "ja"],
+ },
+ localePath: path.resolve("./public/static/locales"),
webpack: (config) => {
config.resolve.fallback = {
...config.resolve.fallback, // if you miss it, all the other options in fallback, specified
diff --git a/package.json b/package.json
index c0079dafd2..47a123e6dc 100644
--- a/package.json
+++ b/package.json
@@ -68,7 +68,7 @@
"jimp": "^0.16.1",
"lodash": "^4.17.21",
"micro": "^9.3.4",
- "next": "^12.0.4",
+ "next": "v12.0.8-canary.0",
"next-auth": "^3.29.0",
"next-i18next": "^8.9.0",
"next-seo": "^4.26.0",
@@ -91,8 +91,8 @@
"react-use-intercom": "1.4.0",
"short-uuid": "^4.2.0",
"stripe": "^8.191.0",
- "tsdav": "^1.1.5",
"superjson": "1.8.0",
+ "tsdav": "^1.1.5",
"tslog": "^3.2.1",
"uuid": "^8.3.2",
"zod": "^3.8.2"
diff --git a/pages/[locale]/index.tsx b/pages/[locale]/index.tsx
deleted file mode 100644
index 2ac43b62d7..0000000000
--- a/pages/[locale]/index.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-/**
- * Needed for `_middleware.ts` to work properly
- * We can decide later what should happen when a user tries to access a locale root.
- */
-export default () => null;
diff --git a/pages/[locale]/[user].tsx b/pages/[user].tsx
similarity index 99%
rename from pages/[locale]/[user].tsx
rename to pages/[user].tsx
index 0f91b7085f..53498053c3 100644
--- a/pages/[locale]/[user].tsx
+++ b/pages/[user].tsx
@@ -44,6 +44,8 @@ export default function User(props: inferSSRProps) {
const { user, eventTypes } = query.data;
const nameOrUsername = user.name || user.username || "";
+ console.log(router.locale);
+
return (
<>