diff --git a/src/i18n/i18n.ts b/src/i18n/i18n.ts index 384edda5..f129f8e1 100644 --- a/src/i18n/i18n.ts +++ b/src/i18n/i18n.ts @@ -1,8 +1,13 @@ import i18n = require('i18n'); + +import fs from 'fs'; import path from 'path'; +const files = fs.readdirSync('./config/locales'); + + i18n.configure({ - locales: ['en', 'de', 'hu'], + locales: files.map(file => file.split('.')[0]), defaultLocale: 'en', directory: path.join(__dirname, '..', '..', 'config', 'locales'), objectNotation: true