aboutsummaryrefslogtreecommitdiffstats
path: root/htdocs/src/js/i18n/i18n.js
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-10-30 22:11:00 +0200
committerArmand Philippot <git@armandphilippot.com>2021-10-30 22:52:23 +0200
commit3a3baddad1c801d77dc398d2c6980f3c14f4a47c (patch)
tree9e06aef730504470111c010e53a1857f7b01ab83 /htdocs/src/js/i18n/i18n.js
parentc3045b163e74b42c0a0e71c646740c76d3bb5ba1 (diff)
chore: move htdocs to repo root
Diffstat (limited to 'htdocs/src/js/i18n/i18n.js')
-rw-r--r--htdocs/src/js/i18n/i18n.js42
1 files changed, 0 insertions, 42 deletions
diff --git a/htdocs/src/js/i18n/i18n.js b/htdocs/src/js/i18n/i18n.js
deleted file mode 100644
index 6bdc7cd..0000000
--- a/htdocs/src/js/i18n/i18n.js
+++ /dev/null
@@ -1,42 +0,0 @@
-import I18n from 'i18n-js';
-import en from './locales/en';
-import fr from './locales/fr';
-
-const supportedLanguages = [
- {
- code: 'en',
- label: 'English',
- translations: en,
- },
- {
- code: 'fr',
- label: 'Français',
- translations: fr,
- },
-];
-
-supportedLanguages.forEach((locale) => {
- I18n.translations[locale.code] = locale.translations;
-});
-
-function setLocale(locale) {
- I18n.locale = locale;
-}
-
-function currentLocale() {
- return I18n.currentLocale();
-}
-
-function translate(name, params = {}) {
- return I18n.t(name, params);
-}
-
-const { defaultLocale } = I18n;
-
-export {
- supportedLanguages,
- setLocale,
- translate,
- defaultLocale,
- currentLocale,
-};