cassoid
Version:
Cassoid, Foundry and your guide to weapon crafting
20 lines (18 loc) • 513 B
JavaScript
const supported = {
en: require('./en.js')
};
/**
* Returns the translations for the application.
*
* @param {String} lang Language that we want to use.
* @returns {Object} The translation strings.
* @public
*/
module.exports = function translations(lang) {
//
// Always use english as base, it's our source of truth. This means that
// when new keys are introduced they will still default to english instead
// of no translation.
//
return { ...supported.en, ...(supported[lang] || {}) };
}