]> git.evergreen-ils.org Git - Evergreen.git/commit
TPac: locale handling improvements
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 22:33:35 +0000 (18:33 -0400)
commit447cc4abd73074c85cf03bd156020f7f42a73eb4
tree8534fe919da863bf387f9abf1d325d11c083e20b
parent15c70c70e474fa234534adc1b0cf75a7812a65df
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