Bug 28925 - OPAC checkout history is not accessing the set language
Summary: OPAC checkout history is not accessing the set language
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-30 22:47 UTC by Aleisha Amohia
Modified: 2022-07-17 11:03 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.