TPAC: Make locale picker match default locale
authorDan Scott <dscott@laurentian.ca>
Mon, 21 Jan 2013 22:02:42 +0000 (17:02 -0500)
committerDan Scott <dscott@laurentian.ca>
Mon, 21 Jan 2013 22:24:41 +0000 (17:24 -0500)
commitc515050e031d1d8262e33f21611965cc3f96aa96
tree2768c2ae5c8d4818602dc55f7b51951b619b439e
parent2f859c0138a293266e2f1d7ec5414953ecf9b482
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>
Open-ILS/src/templates/opac/parts/locale_picker.tt2