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
On first load the translation text will not be displayed (output as empty string <p></p>) . If the language is changed it will display. I found a workaround: if I display a variable, which is updated with a short timeout it will show.
I don't know if it is a svelte or typesafe i18n problem. But it looks like is based on a bad timing.
How can I fix this, without the workaround?
Reproduction
<script>import{LL}from'$i18n/i18n-svelte';letlin='';setTimeout(()=>(line=$LL.intro.paragraph[0]()),1);</script><h3>Missing content on load</h3><ul><li>{@html $LL.intro.paragraph[0]()}</li></ul><h3>Working</h3><ul><li>{$LL.intro.paragraph[0]()}</li><li>{@html line0}</li><li>{@html "Some text"}</li></ul>
Version
5.26.2 with svelte 4.2.0
Describe the bug
On first load the translation text will not be displayed (output as empty string
<p></p>
) . If the language is changed it will display. I found a workaround: if I display a variable, which is updated with a short timeout it will show.I don't know if it is a svelte or typesafe i18n problem. But it looks like is based on a bad timing.
How can I fix this, without the workaround?
Reproduction
Logs
No response
Config
Additional information
No response
The text was updated successfully, but these errors were encountered: