TPac: locale handling improvements template-toolkit-opac
authorBill Erickson <berick@esilibrary.com>
Sun, 11 Sep 2011 15:20:39 +0000 (11:20 -0400)
committerBill Erickson <berick@esilibrary.com>
Sun, 11 Sep 2011 16:12:37 +0000 (12:12 -0400)
commit328a20e4dbeca99fa1d00774e0b349f4c326817f
treee8eaa79aee5b47ca69e12e0505489a5871cebe4a
parentf451be54bb1e5fb197a0b511d4fa1b208e232564
TPac: locale handling improvements

Allow Locale::Maketext to fall through to parent locales
(superordinate) when the a translation for a string in the given locale
is not present.  Locale::Maketext suppports arbitrary-length locale
tags, so it's possible to create locale hierarchies.

For example, you could create branch-specific translations that fall
through to system, then full locale, then base locale, then the default
template strings.

en_us_systemA_branchX => en_us_systemA => en_us => en => <template strings>

Each template string that needs translating will be tried against each
locale in order until it finds a translation.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/examples/oils_web.xml.example
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm