Mercurial > pub > Impl
diff Lib/IMPL/Resources.pm @ 360:39842eedd923
language detection from request
author | sergey |
---|---|
date | Tue, 26 Nov 2013 03:22:44 +0400 |
parents | d485467eca92 |
children | 2eed076cb944 |
line wrap: on
line diff
--- a/Lib/IMPL/Resources.pm Mon Nov 25 02:19:31 2013 +0400 +++ b/Lib/IMPL/Resources.pm Tue Nov 26 03:22:44 2013 +0400 @@ -10,13 +10,16 @@ sub SetLocale { my ($self,$locale) = @_; + $locale =~ tr/\-/_/; + $CurrentLocale = $locale; } sub InvokeInLocale { my ($this,$locale,$code) = @_; - local $CurrentLocale = $locale; + local $CurrentLocale; + $this->SetLocale($locale); eval { &$code() if $code;