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
I'm working on fast performances for my site but the translation package won't enable it to serve translatable routes in route cache. It gives a 404 error because \UriLocalizer::localeFromRequest() won't work in route cache. I worked around this with setting a language hardcoded at that position but if I do that it gives me this error: http://prntscr.com/ixepwg I also worked around this error with replacing 'localize' to TranslationMiddleware::class but now the cache doesn't work properly anymore: http://prntscr.com/ixemvm
How can I fix this or is this a bugg in the translation package??
The text was updated successfully, but these errors were encountered:
@Stijn-van-Nieulande It's not a bug. You can't use the route cache as far as I know since the number of languages is dynamic, and all of your route entries will be replicated for each new language you add to your DB.
If you have any ideas on how to implement this, they'd be welcomed.
I'm working on fast performances for my site but the translation package won't enable it to serve translatable routes in route cache. It gives a 404 error because
\UriLocalizer::localeFromRequest()
won't work in route cache. I worked around this with setting a language hardcoded at that position but if I do that it gives me this error: http://prntscr.com/ixepwg I also worked around this error with replacing'localize'
toTranslationMiddleware::class
but now the cache doesn't work properly anymore: http://prntscr.com/ixemvmHow can I fix this or is this a bugg in the translation package??
The text was updated successfully, but these errors were encountered: