From e067f5f7bd4dc8a64971ec679657beed771e3425 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 26 Jul 2024 22:05:01 +0200 Subject: [PATCH] feat: langs button --- src/i18n/es-ES/index.js | 9 +++++++++ src/pages/Login/LoginView.vue | 26 +++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/i18n/es-ES/index.js b/src/i18n/es-ES/index.js index e8d1cdf6..de9734c3 100644 --- a/src/i18n/es-ES/index.js +++ b/src/i18n/es-ES/index.js @@ -12,6 +12,15 @@ export default { today: 'Hoy', yesterday: 'Ayer', tomorrow: 'Mañana', + language: 'Idioma', + langs: { + en: 'Inglés', + es: 'Español', + ca: 'Catalán', + fr: 'Francés', + mn: 'Ruso', + pt: 'Portugés' + }, date: { days: [ 'Domingo', diff --git a/src/pages/Login/LoginView.vue b/src/pages/Login/LoginView.vue index 13fd981e..4211db3a 100644 --- a/src/pages/Login/LoginView.vue +++ b/src/pages/Login/LoginView.vue @@ -15,6 +15,7 @@ const password = ref(null); const remember = ref(false); const showPwd = ref(false); +const langs = ['en', 'es', 'ca', 'fr', 'mn', 'pt']; onMounted(() => { if (route.query.emailConfirmed !== undefined) { notify({ @@ -56,12 +57,31 @@ async function onLogin() { /> - + /> + + + + {{ $t(`langs.${lang}`) }} + + + +