mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-06 22:20:55 +03:00
a few changes to make A/B testing easier
This commit is contained in:
16
server/languages.js
Normal file
16
server/languages.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const { availableLanguages } = require('../package.json');
|
||||
const config = require('./config');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
function allLangs() {
|
||||
const langs = fs.readdirSync(path.join(__dirname, '..', 'public', 'locales'));
|
||||
langs.unshift('en-US'); // default first, TODO change for fluent-langneg
|
||||
return langs;
|
||||
}
|
||||
|
||||
if (config.l10n_dev) {
|
||||
module.exports = allLangs();
|
||||
} else {
|
||||
module.exports = availableLanguages;
|
||||
}
|
||||
Reference in New Issue
Block a user