Missing "beforeChange"-event
See original GitHub issueI just want to start to dynamically load my translations. I thought I could simply hook into the “change” event and import my message-catalog from there. I was missing that this event is propagated after the locale is set. Therefor the messages are missing while setting the new locale in i18n
and my plan failed miserably… 😉
Describe proposed solution
I would love to have an event which fires on i18n.activate(locale)
, but before the locale is internally actually set. This would enable dynamic message-loading inside the i18n-context without the need for custom methods or similar.
PS: Thanks for the work on linguijs
- love it! ❤️
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (13 by maintainers)
Top Results From Across the Web
Is BeforeChange event listener missing in CM6? - discuss.CodeMirror
This seems to be missing in CM6. The only way to listen for changes I found was to use EditorView.updateListener.of(update => ...) However...
Read more >Getting value of select (dropdown) before change
I am using 1.3.2 version of jQuery and using on change event but the value I am getting over there is after change....
Read more >Tabbar deficiency: No beforeChange event ... looking for help ...
My programming skills may not be that strong so maybe I am missing something but how – if the change event fires AFTER...
Read more >Observables - Knockout.js
If you want to be notified of the value of an observable before it is about to be changed, you can subscribe to...
Read more >Change Streams — MongoDB Manual
To retrieve the data change event from the cursor, iterate the change stream cursor. For information on the change stream event, see Change...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m no maintainer of linguijs so I was just trying to help you in case you were stuck, that’s all 😃 And because I was also like @semoal quite sure you do not need this event. (You can go with an event oriented solution, but I’m pretty sure you can do without and with better and more readable code)
Feel free to post a PR with your solution and your use case, I’m very curious about this solution. If I’m wrong I would be the 1st to support it and use it because I think I have a similar use case (That I solved by doing the less copy / paste I could do, code quoted just above, and it’s fine by me)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.