2017-08-24 23:54:02 +02:00
|
|
|
const { availableLanguages } = require('../package.json');
|
|
|
|
const config = require('./config');
|
|
|
|
const fs = require('fs');
|
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
function allLangs() {
|
2017-11-10 21:40:18 +01:00
|
|
|
return fs.readdirSync(
|
2017-08-25 20:43:59 +02:00
|
|
|
path.join(__dirname, '..', 'dist', 'public', 'locales')
|
|
|
|
);
|
2017-08-24 23:54:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (config.l10n_dev) {
|
|
|
|
module.exports = allLangs();
|
|
|
|
} else {
|
|
|
|
module.exports = availableLanguages;
|
|
|
|
}
|