TPAC: Make locale picker match default locale
authorDan Scott <dscott@laurentian.ca>
Mon, 21 Jan 2013 22:02:42 +0000 (17:02 -0500)
committerBen Shum <bshum@biblio.org>
Wed, 6 Feb 2013 04:06:04 +0000 (23:06 -0500)
commita4526145b8047e864495178b3d63d52b81fc0345
treee46fefadd1b879c8a23e1077ef86080d80bd393c
parent6a1db3f4f1bd2e355032cfc82b59af8861d8fc2a
TPAC: Make locale picker match default locale

As noted by Pasi Kallinen, the language picker would not reflect the
chosen locale unless your cookie had been set or there was an explicit
CGI parameter with the locale name.

Accordingly, get the default locale from the context vars and use that
to set the selected value for the language picker in the absence of
anything else, to prevent the picker from possibly confusingly showing
the first language alphabetically rather than the currently displayed
language in the rest of the UI.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/templates/opac/parts/locale_picker.tt2