diff options
| author | Andrew Lee <andrew@alee14.me> | 2025-04-02 02:21:41 -0400 |
|---|---|---|
| committer | Andrew Lee <andrew@alee14.me> | 2025-04-02 02:21:41 -0400 |
| commit | 10434adad478d21bbb834a5803125db9f54c9d6c (patch) | |
| tree | e1159a26948d24c2a065dfd15f71b64970515930 /bot/src/utils/i18n.js | |
| parent | 657599acccf351c7c9366cec9f648b7496c89bdb (diff) | |
| download | AleeBot-beta.tar.gz AleeBot-beta.tar.bz2 AleeBot-beta.zip | |
Added i18n (basic); Blacklist feature; Put error msg into a filebeta
Diffstat (limited to 'bot/src/utils/i18n.js')
| -rw-r--r-- | bot/src/utils/i18n.js | 12 |
1 files changed, 11 insertions, 1 deletions
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' + } +}); |
