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
The docs recommends one use Padrino.before_load but when this runs app/locale has not been loaded, so assigning a locale that's not part of Padrino will result in a failure even though the locale is configured in app/locale.
The right way to go about the seems to be via the app's configure hook just adding the local locales to I18n.load_path yourself in before_load or configure.
The text was updated successfully, but these errors were encountered:
It's also worth noting that setting I18n.locale to :de in before_loadwill not actually set the request's locale to :de. I18n stores the locale in thread local storage and in most (all?) cases the before_load thread is different than the Rack handler's.
The docs recommends one use
Padrino.before_load
but when this runsapp/locale
has not been loaded, so assigning a locale that's not part of Padrino will result in a failure even though the locale is configured inapp/locale
.The right way to go about the seems to be
via the app'sjust adding the local locales toconfigure
hookI18n.load_path
yourself inbefore_load
orconfigure
.The text was updated successfully, but these errors were encountered: