No current schema languages/datatype libraries support localized validation; none will while there is no way to gather information.
The minimal implementation adds one method to ValidationContext:
String getXmlLang()
It may return null if there is no "xml:lang" declared in the instance. Otherwise, it returns the language code of the xml:lang attribute found on the document's root element (simplest implementation) or of the most recent declaration in the ancestor-or-self axis (note that this implies checking for the xml:lang attribute on an element before validating other elements, but this is likely similar to existing parsing techniques that insure that namespaces declared on an element have been processed before attempting to validate attributes in that namespace).
For information: I'm in process of defining something that permits localized "datatypes" (not the term I would use, but the one consistent with this project), and implementing this API; currently the localization possibilities are superfluous since there's no way to take advantage of them (in relaxng or any other schema language, not that any other schema language offers the same degree of "datatype" pluggability).
My preference is for the more complex implementation, but even a document-level language indicator permits *some* degree of localized validation.
Amy!
mailto:amyzing@talsever.org