Files
no-twitter-bot/src/bot/i18n.ts
Lucid Kobold fa1e07e4af First build
2025-02-19 11:11:47 -05:00

16 lines
411 B
TypeScript

import type { Context } from "#root/bot/context.js";
import path from "node:path";
import process from "node:process";
import { I18n } from "@grammyjs/i18n";
export const i18n = new I18n<Context>({
defaultLocale: "en",
directory: path.resolve(process.cwd(), "locales"),
useSession: true,
fluentBundleOptions: {
useIsolating: false
}
});
export const isMultipleLocales = i18n.locales.length > 1;