Mercurial > pub > Impl
diff Lib/IMPL/Web/Handler/LocaleHandler.pm @ 395:212cc86e470b
Code cleanup
DateTime locale support for HTTP requests
author | sergey |
---|---|
date | Thu, 20 Feb 2014 01:33:03 +0400 |
parents | eff7f75a4408 |
children |
line wrap: on
line diff
--- a/Lib/IMPL/Web/Handler/LocaleHandler.pm Tue Feb 18 18:17:20 2014 +0400 +++ b/Lib/IMPL/Web/Handler/LocaleHandler.pm Thu Feb 20 01:33:03 2014 +0400 @@ -2,6 +2,7 @@ use strict; use IMPL::Const qw(:prop); +use DateTime; use IMPL::declare { require => { Resources => 'IMPL::Resources' @@ -56,7 +57,11 @@ $locale = $best->[0]; } - Resources->SetLocale($locale) if $locale; + if($locale) { + Resources->SetLocale($locale); + #$locale =~ tr/-/_/; + DateTime->DefaultLocale($locale); + } return $nextHandler->($action); }