Abstract base class for entities containing i18n or l10n content, including
utility methods for extracting and processing text that uses language tags
and text direction (e.g.
Filters a set of elements using the locales and returns a copy of the array
containing only elements that match the locales, or that are not localized
if there are no matches
Returns the first (best) match for an element given the set of locales, or will fall back to the
match for defaultLocale if there are no suitable matches, and then to null
if there are no elements at all.
Returns the text content of an element, recursively adding
any text nodes found in its child nodes AND any elements
that include localization information
Checks whether this object has valid localization settings; specifically that the lang property of this
object is a valid language-tag according to BCP-47
Normalizes all space characters in the given string to
U+0020, then collapses multiple adjacent spaces to a single space, and
removes any leading and trailing spaces.
Normalizes all whitespace and space characters in the given string to
U+0020, then collapses multiple adjacent spaces to a single space, and
removes any leading and trailing spaces.
Filters and sorts a list of localized elements using the given locale list; only localized elements
are returned unless no appropriate localized elements are found, in which case nonlocalized elements
are returned.
Filters and sorts a list of localized elements using the given locale list; only localized elements
are returned unless no appropriate localized elements are found, in which case nonlocalized elements
are returned
A utility class for sanitizing unicode strings in accordance with the rules for
handling normalized text content and attributes set out in the W3C Widgets
specification
uses apache commons compress to unpack all the zip entries into a target folder
partly adapted from the examples on the apache commons compress site, and an
example of generic Zip unpacking.