You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I hover over a link element that points to a subpage of my web domain other than the one I'm currently on, the website translation returns to its default language (English). However, if I hover over a link that refers to the same page or hover over a link that has target="_blank" or target="_self", this bug does not happens.
Logs
There are no logs, nor any type of error.
To Reproduce
Create a project as specified on the sveltekit page.
Install the "svelte-i18n" module.
Create a script called i18n.ts/i18n.js, like this:
import {
_,
register,
init
} from 'svelte-i18n';
function setupI18n({withLocale: _locale, pageName=undefined} = {withLocale: 'en', pageName:'index'})
{
register('en', () => import('../../json/lang/en.json'));
register('es', () => import('../../json/lang/es.json'));
return init({
// fallback to english if the current locale is not in the dictionary
fallbackLocale: 'en',
initialLocale: 'en',
});
}
export {
_,
setupI18n
};
Create 2 jsons with languages (English and your native language).
Create one or two more pages, and add translated text to them.
Create an element to be able to change languages.
When hovering over a link that points to another of the pages created by you without the "target" attribute, the default language should be set to "en".
Expected behavior
This behavior should not occur under any circumstances. And although I have tried adding 'target="_self"' and this problem has stopped occurring, I have noticed that when changing pages, it no longer has the dynamism and fast loading that it had before, so I preferred to avoid it.
Information about your project:
I'm using typescript.
svelte-i18n version: 3.7.0
My project uses Vite.
The text was updated successfully, but these errors were encountered:
Describe the bug
When I hover over a link element that points to a subpage of my web domain other than the one I'm currently on, the website translation returns to its default language (English). However, if I hover over a link that refers to the same page or hover over a link that has target="_blank" or target="_self", this bug does not happens.
Logs
There are no logs, nor any type of error.
To Reproduce
Expected behavior
This behavior should not occur under any circumstances. And although I have tried adding 'target="_self"' and this problem has stopped occurring, I have noticed that when changing pages, it no longer has the dynamism and fast loading that it had before, so I preferred to avoid it.
Information about your project:
I'm using typescript.
svelte-i18n
version: 3.7.0My project uses Vite.
The text was updated successfully, but these errors were encountered: