LP1171875 Add locale support to IDL2js
authorBill Erickson <berick@esilibrary.com>
Fri, 26 Apr 2013 17:20:24 +0000 (13:20 -0400)
committerBill Erickson <berick@esilibrary.com>
Mon, 6 May 2013 14:18:23 +0000 (10:18 -0400)
commit7d3a9cce4775ae11b8c75badbf576e7e7dbd342c
tree25beb53f515c58377a6ecccacb0c69f85cd56673
parent2be86106c04187a6bfeb3a688b1e87d1743f441f
LP1171875 Add locale support to IDL2js

/IDL2js now reads locale information from either locale= CGI parameter
or Accept-Language HTTP headers.  The locale-aware IDL is loaded from
/reports/fm_IDL.xml via Apache subrequest.  Each full copy of the IDL is
cached within the Apache processes to avoid the need to re-parse the IDL ad
infinitum for full IDL retrieval.  Partial IDL retrieval is also supported
(but not cached).

No attempt is made to cleanse the locale -- invalid locale strings are
discarded -- so it's the callers responsibility to pass a valid locale.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/IDL2js.pm