From 73e8b168c3ffc4e3ffe30e50dd3e46ed70d909d8 Mon Sep 17 00:00:00 2001 From: INOUE Daisuke Date: Sat, 22 Mar 2025 22:55:46 +0900 Subject: some fix, moment.locale setting --- src/app.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/app.ts') diff --git a/src/app.ts b/src/app.ts index 9301484..a71bf30 100755 --- a/src/app.ts +++ b/src/app.ts @@ -31,6 +31,7 @@ import { activityPubContentType, alternateActivityPubContentType, } from "./lib/activitypub.js"; +import moment from "moment"; const app = express(); @@ -125,6 +126,10 @@ async function initializeApp() { console.error('handlebars-i18next helper is not properly loaded'); } + i18next.on('languageChanged', function(lng) { + moment.locale(lng); + }); + app.engine("handlebars", hbsInstance.engine); app.set("view engine", "handlebars"); app.set("hbsInstance", hbsInstance); -- cgit v1.2.3