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:08 +0000 (17:24 -0500)
commit61613555323a04a3ac4c889c9254690f1052aa9e
tree2f4f4c0d047d295a18666b910c117d7da7789918
parentb86b18d38e1cc175639d577780a14c425ebe8688
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