Replies: 1 comment 1 reply
-
In Breaking changes it written: To improve performance, the changeLocale function has been removed and it is no longer possible to change locale at runtime without navigating/reloading the page (SPA or MPA is indifferent). Not only was the
Why this change? Because translation at
So we have better performance, and less memory usage. Of course, I too have always thought that changing the language without reloading the page in SPA mode is more elegant, but:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to update new
locale
property inspeakContext
?I see that in 0.9.0 the breaking change is the removal of
changeLocale
. Previously, this function allowsed to updatelocale
inspeakContext
. Now we don't have any ways to updatelocale
inspeakContext
anymore.This can lead to the situation that users try to use
useSpeakContext
hook to access the value oflocale
but now the value is no longer updated after the last locale change.How to make translation texts to change when using SPA navigation with
useNavigate
?When testing locally with SPA navigation with
useNavigate
, theloadTranslation$
isn't executed which makes the new translation texts are not displayed on the page.I saw the doc only uses
location.reload
but that is full page reload and I think SPA navigation should be supported too.Beta Was this translation helpful? Give feedback.
All reactions