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
Hi, I have noticed some annoying behavior which is as follows:
I listen for the initialized event (i18next.on('initialized')) to make sure that everything is setup before my app's code runs -- I need to make sure my translations are there. However, if my code gets run at a point after the initialized event occurs, it never runs at all, because it is inside this check.
Is there an easy way to listen for the event to fire or if it has already fired, then do something? I read this is how addEventListener functions and I wish I could just get the same behavior with on.
Thanks
The text was updated successfully, but these errors were encountered:
Solved this myself. I checked for isInitialized, and if it's not set, listen to onInitialized event, otherwise if it is set, everything should be fine, IF you only care about the fallbackLng being loaded. I didn't need to worry about the other possibility myself.
Hi, I have noticed some annoying behavior which is as follows:
I listen for the initialized event (
i18next.on('initialized')
) to make sure that everything is setup before my app's code runs -- I need to make sure my translations are there. However, if my code gets run at a point after the initialized event occurs, it never runs at all, because it is inside this check.Is there an easy way to listen for the event to fire or if it has already fired, then do something? I read this is how
addEventListener
functions and I wish I could just get the same behavior withon
.Thanks
The text was updated successfully, but these errors were encountered: