Ignore:
Timestamp:
12/28/15 15:45:11 (9 years ago)
Author:
nanardon
Message:

Add I18N support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Root.pm

    r1544 r1546  
    3131sub begin : Private { 
    3232    my ( $self, $c ) = @_; 
     33 
     34    my ($locale) = split(';', $c->req->header('Accept-Language') || ''); 
     35    if (my $plocale = ($c->req->param('locale')|| $c->session->{'locale'})) { 
     36        $c->session->{'locale'} = $locale = $plocale; 
     37    } 
     38    $c->languages($locale ? [ $locale ] : ''); 
    3339 
    3440    if ($c->user_exists) { 
Note: See TracChangeset for help on using the changeset viewer.