diff options
author | franck cuny <franck@lumberjaph.net> | 2010-05-27 20:49:58 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-05-27 20:49:58 +0200 |
commit | d88bc57e7eff6c0734abbd4001d81159cdade581 (patch) | |
tree | 35d5f2d77dcc030fd8535b00ba4c669dccfb462b | |
parent | detect locale from http headers (diff) | |
download | plack-middleware-i18n-master.tar.gz |
rename default lang to dfault locale master
-rw-r--r-- | lib/Plack/Middleware/i18n.pm | 5 | ||||
-rw-r--r-- | t/01_basic.t | 1 |
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/Plack/Middleware/i18n.pm b/lib/Plack/Middleware/i18n.pm index 6a6e927..aabb0a9 100644 --- a/lib/Plack/Middleware/i18n.pm +++ b/lib/Plack/Middleware/i18n.pm @@ -4,8 +4,7 @@ use strict; use warnings; use Plack::Util; -use Plack::Util::Accessor qw/default_lang/; -use Plack::Request; +use Plack::Util::Accessor qw/default_locale/; use I18N::LangTags; use I18N::LangTags::Detect; @@ -30,7 +29,7 @@ sub call { )[0]; } else { - $locale = $self->default_lang // 'en'; + $locale = $self->default_locale // 'en'; } $env->{'psgix.locale'} = $locale; diff --git a/t/01_basic.t b/t/01_basic.t index c18f862..d03d55e 100644 --- a/t/01_basic.t +++ b/t/01_basic.t @@ -29,4 +29,3 @@ test_psgi }; done_testing(); - |