LP1171875 Add locale support to IDL2js
authorBill Erickson <berick@esilibrary.com>
Fri, 26 Apr 2013 17:20:24 +0000 (13:20 -0400)
committerPasi Kallinen <pasi.kallinen@pttk.fi>
Tue, 7 May 2013 09:29:43 +0000 (12:29 +0300)
commit433a7c3e92f574e84d17b9c3285a82a69c08ea64
tree26e48ef44334cf9edff1ae03e79d8dac67a6ea05
parent885eacc8fa6c768dea4443d471bb9f1d0f8d1c9a
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>
Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Open-ILS/src/perlmods/lib/OpenILS/WWW/IDL2js.pm