Semaphore/web/src/lang/index.js
2023-07-04 16:47:29 +02:00

9 lines
284 B
JavaScript

const files = require.context('.', false, /\.js$/);
const messages = {};
files.keys().forEach((key) => {
if (key === './index.js') return;
messages[key.replace(/(\.\/|\.js)/g, '')] = files(key).default;
});
const languages = Object.keys(messages);
export { messages, languages };