diff options
author | ache <ache@ache.one> | 2023-04-22 00:08:23 +0200 |
---|---|---|
committer | ache <ache@ache.one> | 2023-04-22 00:08:23 +0200 |
commit | e089388ab53d8e015f0cc997b3cee0fb1d62bca6 (patch) | |
tree | 677567c50de3cfa03bcd383ac558a980d4412bc5 /src/build/i18n.mjs | |
parent | Replace the mamooth (diff) |
Support for multilang
Diffstat (limited to 'src/build/i18n.mjs')
-rw-r--r-- | src/build/i18n.mjs | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/build/i18n.mjs b/src/build/i18n.mjs new file mode 100644 index 0000000..f81f413 --- /dev/null +++ b/src/build/i18n.mjs @@ -0,0 +1,56 @@ + +const i18n = { + fr: { + intro: { + 'description': 'Éternel étudiant en Math-Info.', + 'about': 'Autodidacte passionné,<br><span class="type_wrap"><span class="type">désormais ingénieur.</span></span>', + 'about_tags': 'GNU\Linux, C, C++, Python, Math, autohébergement, décentralisation, P2P, commun, ... <br> ', + }, + title: { + 'main': 'ache: Blog personnel', + 'home': 'L\'accueil', + 'git': 'Dépôt git personnel', + 'mastodon': 'Mon mastodon', + }, + articles: [ + 'bizarreries-du-langage-c.md', + 'retour-sur-laoc-2021-semaine-1.md', + '2FA-discord-sur-pc.md', + 'duckduckgo-google-en-mieux.md', + ] + }, + en: { + intro: { + 'description': 'Everlast CS student.', + 'about': 'Passionated self-taught,<br><span class="type_wrap"><span class="type">now engineer.</span></span>', + 'about_tags': 'GNU\Linux, C, C++, Python, Math, self-hosted, dececntralisation, P2P, ... <br>', + }, + title: { + 'main': 'ache: Personnel blog', + 'home': 'Home', + 'git': 'Personnel git repository', + 'mastodon': 'Mastodon account', + }, + articles: [ + 'c-language-quirks.md', + ] + } +} + +const lang_desc = { + fr: "Version Française", + en: "English version", +} + +export function addDescription(alt_lang) { + if (alt_lang) { + alt_lang.forEach(e => { + e.description = lang_desc[e.lang] + }); + } + + return alt_lang; +} + + +export default i18n; |