1
0
mirror of https://github.com/GenderDysphoria/GenderDysphoria.fyi.git synced 2025-11-25 20:42:40 +00:00

Adding more internationalization support

This commit is contained in:
Jocelyn Badgley (Twipped)
2021-08-11 11:23:59 -07:00
parent 84133bd212
commit 59e4380906
10 changed files with 115 additions and 78 deletions

11
lang/en.js Normal file
View File

@@ -0,0 +1,11 @@
module.exports = exports = {
SITE_TITLE: 'That\'s Gender Dysphoria, FYI',
SITE_DESCRIPTION: 'A resource for those questioning their gender, already on a gender journey, or simply wanting to learn more about what it is to be transgender.',
HEADER_TITLE: 'That\'s Gender Dysphoria, <abbr title="For Your Information">FYI</abbr>',
PATREON_FOOTER_BODY: 'This site is made possible thanks to contributions from the community. If you have found this site invaluable, please consider <a href="https://www.patreon.com/curvyandtrans">making a pledge on patreon</a> or a <a href="https://ko-fi.com/curvyandtrans">donation via Ko-fi</a>.',
PATREON_FOOTER_THANKS: 'Special thanks to the following patreon supporters:',
FOOTER_COPYRIGHT: 'Site text, website code and original graphics are <a href="https://creativecommons.org/licenses/by-nc-sa/2.0/">licensed CC BY-NC-SA.</a>',
};

8
lang/es.js Normal file
View File

@@ -0,0 +1,8 @@
module.exports = exports = {
SITE_TITLE: 'Eso es Disforia de Género, PSI',
HEADER_TITLE: 'Eso es Disforia de Género, <abbr title="Para Su Información">PSI</abbr>',
};

12
lang/index.js Normal file
View File

@@ -0,0 +1,12 @@
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;
};