feat: full studio build -- light theme, canvas thumbnails, i18n (fa/en)

This commit is contained in:
Soroush.Asadi
2026-05-24 17:37:21 +03:30
parent d962483359
commit c61f587767
295 changed files with 29797 additions and 265 deletions
+16
View File
@@ -0,0 +1,16 @@
import { getRequestConfig } from "next-intl/server";
import { routing } from "./routing";
export default getRequestConfig(async ({ requestLocale }) => {
let locale = await requestLocale;
// Validate locale — fall back to default if unknown
if (!locale || !(routing.locales as readonly string[]).includes(locale)) {
locale = routing.defaultLocale;
}
return {
locale,
messages: (await import(`../../messages/${locale}.json`)).default,
};
});
+12
View File
@@ -0,0 +1,12 @@
import { defineRouting } from "next-intl/routing";
export const routing = defineRouting({
/** All supported locales */
locales: ["fa", "en"] as const,
/** Default locale — no URL prefix */
defaultLocale: "fa",
/** Default locale gets no /fa/ prefix; English is under /en/ */
localePrefix: "as-needed",
});
export type Locale = (typeof routing.locales)[number];