Bug 28925

Summary: OPAC checkout history is not accessing the set language
Product: Koha Reporter: Aleisha Amohia <aleisha>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24223
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Aleisha Amohia 2021-08-30 22:47:04 UTC
OpacNav is still in the system preferences (yet to be moved to Tools -> Notices) so in the meantime we've done a bit of hacky work to make our OpacNav translateable.

We changed this line in koha-tmpl/opac-tmpl/bootstrap/en/includes/navigation.inc:
<div id="opacnav">[% OpacNav | $raw %]</div>
to:
<div id="opacnav">[% OpacNav | eval %]</div>
so that it would render Template Toolkit in OpacNav.

Then, in OpacNav, we added some code like:
[% IF lang == 'mi-NZ' %]
Show navigation in te reo Māori
[% ELSE %]
Show navigation in English
[% END %]

This seems to work most everywhere in the OPAC, except for the user's checkout history. When printing [% lang %], it looks like $lang is set to default, rather than any of the languages we have installed.

$lang should be set to the installed and selected language.
Comment 1 Owen Leonard 2021-09-20 15:48:31 UTC
Bug 24223 is currently awaiting testing, but this bug probably needs its own fix for previous versions.
Comment 2 Katrin Fischer 2022-07-17 11:03:13 UTC
Could it be clashing with the user's language preference? We had that happen in other spots too as the field in the patron table is also called lang.