Only switch lang if required

This commit is contained in:
Daniel Berteaud 2015-07-26 18:41:28 +02:00
parent 091cea369e
commit f5d876455d
1 changed files with 1 additions and 1 deletions

View File

@ -2381,7 +2381,7 @@ app->sessions->cookie_name('vroom');
app->hook(before_dispatch => sub {
my $self = shift;
# Switch to the desired language
if ($self->session('language')){
if ($self->session('language') && $self->session('language') ne $self->languages){
$self->languages($self->session('language'));
}
# Stash the configuration hashref