TPAC: Make locale picker match default locale user/paxed/fix_locale_picker-signoff
authorDan Scott <dscott@laurentian.ca>
Mon, 21 Jan 2013 22:02:42 +0000 (17:02 -0500)
committerPasi Kallinen <pasi.kallinen@pttk.fi>
Tue, 22 Jan 2013 08:23:51 +0000 (10:23 +0200)
commit89e0898808b929305d2c88632ec9a74556afc0ac
tree52b713e275de5a9bdd5a5352f4e86c9b78395714
parent829462a97d2c28d698c43adc01897e5946ed581f
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>
Open-ILS/src/templates/opac/parts/locale_picker.tt2