mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-01-31 07:16:17 +00:00
13 lines
310 B
JavaScript
13 lines
310 B
JavaScript
|
|
const languages = {
|
|
en: require('./en'),
|
|
es: require('./es'),
|
|
};
|
|
|
|
module.exports = exports = function (lang, key, ...args) {
|
|
var entry = languages[lang] && languages[lang][key];
|
|
if (!entry) entry = languages.en[key];
|
|
if (typeof entry === 'function') return entry(...args);
|
|
return entry || key;
|
|
};
|