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
Hello!
Recently I had some problems with the Translate behavior in a new app I'm developing using CakePHP 3.0. The prob was that translations queries were never executed because of this two reasons:
So, in this case, current locale and default locale will never differ. If you don't call explicitly I18n:locale('whatever'), or $model->local('whatever') in your code, i18n tables will never be accessed.
My suggestion is to change this line to be I18n:locale($locale). Actually, when you make a request with an accept language header, it shouldn't affect the default locale that (AFAIK) should be a static configuration parameter.
Thanks in advance and congrats for your good work!
The text was updated successfully, but these errors were encountered:
Sure! This is going to be my first collaboration to open source using git, github, unit tests, and so on. The pull request will be ready in a few minutes. Though is an ultra-simple change I hope I make no mistakes :)
Hello!
Recently I had some problems with the Translate behavior in a new app I'm developing using CakePHP 3.0. The prob was that translations queries were never executed because of this two reasons:
So, in this case, current locale and default locale will never differ. If you don't call explicitly
I18n:locale('whatever')
, or$model->local('whatever')
in your code, i18n tables will never be accessed.My suggestion is to change this line to be
I18n:locale($locale)
. Actually, when you make a request with an accept language header, it shouldn't affect the default locale that (AFAIK) should be a static configuration parameter.Thanks in advance and congrats for your good work!
The text was updated successfully, but these errors were encountered: