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
Find this issue due to the incorrect value of the lang attribute. svelte-i18n automatically changes the value of the lang attribute on the <html> element. Most of the time, it works correctly. However, on some page loads, the lang attribute gets an incorrect value.
Logs
No errors or warnings.
To Reproduce svelte-i18n-issue-lang
In reproduce only SvelteKit is initialized, and the svelte-i18n library is added. In this case, the bug appears rarely, but it does appear. Attaching a video 2024-07-04 19-52-07.webm, bug on 8 sec.
When loading the page at the address /de, the lang attribute is must set to de, but once it is set to en.
As mentioned, in the demo above, this bug appears rarely. Encountered it in a project where this error occurs more frequently, can provide a link to the project if needed, it's not commercial code.
When preparing the example, noticed a problem with content localization, not just with the lang attribute. In the project where discovered this issue, only the lang attribute works incorrectly, the content localization is displayed without errors.
Expected behavior
Locale set correctly on all page loads.
Information about your project:
Your browser and the version: Chrome 126
Your operating system: Windows 10
svelte-i18n version 4.0.0
Rollup
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Thank you for the great library!
Describe the bug
Find this issue due to the incorrect value of the
lang
attribute.svelte-i18n
automatically changes the value of thelang
attribute on the<html>
element. Most of the time, it works correctly. However, on some page loads, thelang
attribute gets an incorrect value.Logs
No errors or warnings.
To Reproduce
svelte-i18n-issue-lang
In reproduce only SvelteKit is initialized, and the
svelte-i18n
library is added. In this case, the bug appears rarely, but it does appear. Attaching a video 2024-07-04 19-52-07.webm, bug on 8 sec.When loading the page at the address
/de
, thelang
attribute is must set tode
, but once it is set toen
.As mentioned, in the demo above, this bug appears rarely. Encountered it in a project where this error occurs more frequently, can provide a link to the project if needed, it's not commercial code.
When preparing the example, noticed a problem with content localization, not just with the
lang
attribute. In the project where discovered this issue, only thelang
attribute works incorrectly, the content localization is displayed without errors.Expected behavior
Locale set correctly on all page loads.
Information about your project:
Your browser and the version: Chrome 126
Your operating system: Windows 10
svelte-i18n
version 4.0.0Rollup
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: