From 10434adad478d21bbb834a5803125db9f54c9d6c Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Wed, 2 Apr 2025 02:21:41 -0400 Subject: Added i18n (basic); Blacklist feature; Put error msg into a file --- bot/src/utils/i18n.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'bot/src/utils/i18n.js') diff --git a/bot/src/utils/i18n.js b/bot/src/utils/i18n.js index 2b4a4be..9b03994 100644 --- a/bot/src/utils/i18n.js +++ b/bot/src/utils/i18n.js @@ -1 +1,11 @@ -// Feature for AleeBot 4.1 +import i18next from 'i18next'; +import fsBackend from 'i18next-fs-backend'; +const fallbackLanguage = 'en'; + +i18next.use(fsBackend).init({ + debug: true, + fallbackLng: fallbackLanguage, + backend: { + loadPath: './src/translations/{{lng}}/{{ns}}.json' + } +}); -- cgit v1.2.3