[Koha-bugs] [Bug 8019] New: Preserve language choice between Browser sessions

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Apr 28 00:26:35 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8019

          Priority: P5 - low
 Change sponsored?: ---
            Bug ID: 8019
          Assignee: frederic at tamil.fr
           Summary: Preserve language choice between Browser sessions
          Severity: major
    Classification: Unclassified
                OS: All
          Reporter: veron at veron.ch
          Hardware: All
            Status: NEW
           Version: master
         Component: I18N/L10N
           Product: Koha

If I select a language in Staff client or Opac, I expect it to be persistent
between browser sessions.

This is not the case. Koha forgets the selection as soon as all Broser
instances are closed, and starts up the next session with the Browser's
preferred language.

This behaviour is due to the Cookie KohaOpacLanguage. I expires when the
browser is closed because no expiry date is set in
C4\Templates.pm, line 298 ff:

sub setlanguagecookie {
    my ( $query, $language, $uri ) = @_;
    my $cookie = $query->cookie(
        -name    => 'KohaOpacLanguage',
        -value   => $language,
        -expires => ''
    );
    print $query->redirect(
        -uri    => $uri,
        -cookie => $cookie
    );
}

Solution: Set -expires to a value like +3y (3 years from now)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list