Skip to content
Snippets Groups Projects
Commit b6e70c10 authored by Cee Nell's avatar Cee Nell
Browse files

typos in es endings

parent fe4db09d
No related branches found
No related tags found
No related merge requests found
......@@ -27,11 +27,14 @@ function handleLanguageChange(event) {
function switchLanguage(lang) {
if (locale.value !== lang) {
locale.value = lang; // Update the locale
locale.value = lang;
// Update the URL with the new language
// Remove any existing language prefix from the current path
const currentPath = route.path.replace(/^\/(en|es)/, '');
// Construct the new path with the selected language
router.push({
path: `/${lang}${route.path.substring(3) || ''}` // Preserve the existing path, only change the language
path: `/${lang}${currentPath || '/'}`
});
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment