This occurs in the "Table 7-4 Input Tag Attributes" table on http://docs.oracle.com/javaee/6/tutorial/doc/bnarf.html. HTML language codes are en-US, not en_US. This format is described at http://www.ietf.org/rfc/rfc1766.txt. Similarly, attributes are case sensitive in the XHTML world, so the dir attribute example values should be "ltr" and "rtl", not "LTR" and "RTL".
Thanks very much again. Fixed in source.
Direction indication for text that does not inherit directionality.
Valid values are "LTR" (left-to-right) and "RTL" (right-to-left).
+ These attributes are case sensitive when rendering to XHTML, so
+ care must be taken to have the correct case.
Transmitting file data ..
Committed revision 11665.
I'll investigate this further. Thanks.
I tested it out.
I put in a page:
This was in the output.
<input type="text" name="j_idt13" lang="en_US" />
It is correct from a JSF standpoint. JSF just puts the lang contents (after evaluation any EL expression) into the rendered lang attribute. So I can put lang="banana" in the JSF and get lang="banana" rendered even though that is clearly nonsense. It is not correct from an HTML standpoint where the valid language format comes from the RFC I mentioned. You can make up your own language tags, but those should be prefixed with an x- like x-gibberish.
Actually, in Java the language codes do have underscores (see http://docs.oracle.com/javaee/6/tutorial/doc/bnaxv.html and the API documentation for the java.util.locale class). Underscores seem to be common on UNIX systems, while hyphens are used on Windows systems and in web browsers, but we're in the Java world here.
Also, the JSF input tag attributes do apparently take the attribute names in uppercase, according to the Facelets tag documentation at http://docs.oracle.com/javaee/6/javaserverfaces/2.1/docs/vdldocs/facelets/; see h:inputText, for example. Presumably this is converted to lowercase by the implementation.