-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hook startup functions on on_page_view event instead of on_start #47
Conversation
Setup translation language before startup/process.php. Related concretecms/concretecms@4fdea7e
What about tools? In dispatcher.php The source of the problem is that the localization must be initialized as soon as possible. My solution would fix locale-dependent constants and setup the correct locale at a very early step of the dispatcher. |
I totally agree with early initialize localization, but maybe we need more discussion about add warm up method... Anyway, this change will fix some problem in Internationalization after core 5.6.3 released. |
Yes, it fixes some problems by initializing multilingual a bit earlier (but as I stated above it should be initialized a lot earlier) |
Another problem with this approach is that package localizations does not get loaded: |
@mlocati package localizations get loaded after the last few changes you've made, don't they? The only problem left is the tools related issue? I believe this PR doesn't have any negative effects but fixes an important bug and should therefore be merged. |
Yes. Packages localization gets loaded at Localization initialization and when Localization::changeLocale is called. |
@tylerryan Any chance this can get merged? I'd still prefer to have the whole i18n stuff in the core where we could initialize it even earlier, but this pull request fixes one rather annoying bug. |
If it works I can't see any reasons to not merge this 😉 |
Hook startup functions on on_page_view event instead of on_start
it does work for me and as long as no one else complains I'm good, thanks (: |
Setup translation language before startup/process.php.
Related commit: concretecms/concretecms@4fdea7e
It even works fine on before 5.6.3, but I want to more testing about this change by others.