1
0
mirror of https://gitlab.com/timvisee/send.git synced 2024-11-10 13:13:00 +01:00
send/server/languages.js
2017-11-10 12:40:18 -08:00

17 lines
371 B
JavaScript

const { availableLanguages } = require('../package.json');
const config = require('./config');
const fs = require('fs');
const path = require('path');
function allLangs() {
return fs.readdirSync(
path.join(__dirname, '..', 'dist', 'public', 'locales')
);
}
if (config.l10n_dev) {
module.exports = allLangs();
} else {
module.exports = availableLanguages;
}