remove vue-i18n

This commit is contained in:
2026-03-06 00:08:51 +07:00
parent dba9713d96
commit bbe15d5f3e
15 changed files with 2307 additions and 2289 deletions

View File

@@ -2,9 +2,16 @@ import { contextStorage } from 'hono/context-storage';
import { cors } from 'hono/cors';
import isMobile from 'is-mobile';
import type { Hono } from 'hono';
import { languageDetector } from 'hono/language';
export function setupMiddlewares(app: Hono) {
app.use('*', contextStorage());
app.use('*', languageDetector({
supportedLanguages: ['vi', 'en'],
fallbackLanguage: 'en',
lookupCookie: 'i18next',
lookupFromHeaderKey: 'accept-language',
order: ['cookie', 'header'],
}) ,contextStorage());
app.use(cors(), async (c, next) => {
c.set("fetch", app.request.bind(app));