done i18n

This commit is contained in:
2026-03-06 18:46:21 +00:00
parent 3c24da4af8
commit edc1a33547
44 changed files with 2289 additions and 2390 deletions

View File

@@ -10,17 +10,17 @@ export function setupMiddlewares(app: Hono) {
fallbackLanguage: 'en',
lookupCookie: 'i18next',
lookupFromHeaderKey: 'accept-language',
order: ['cookie', 'header'],
order: ['cookie', 'header'],
}) ,contextStorage());
app.use(cors(), async (c, next) => {
c.set("fetch", app.request.bind(app));
const ua = c.req.header("User-Agent");
if (!ua) {
return c.json({ error: "User-Agent header is missing" }, 400);
}
c.set("isMobile", isMobile({ ua }));
await next();
});