/** * Set the xml:lang attribute. * * @param locale Value of the xml:lang attribute. * @see #ATTRIBUTE_XML_LANG * @since 0.7.1 */ public void setXmlLang(final Locale locale) { final String xmlLang = LanguageIdentifierConverter.toLanguageIdentifier(locale); setAttribute(ATTRIBUTE_XML_LANG, xmlLang); }
/** * Retrieve the xml:lang attribute. * * @return Value of the xml:lang attribute. * @see #ATTRIBUTE_XML_LANG * @since 0.7.1 */ public Locale getXmlLangObject() { final String xmlLang = getXmlLang(); return LanguageIdentifierConverter.toLocale(xmlLang); }