Note: there has been a change in the draft Recommendation,
such that <language> is now defined as either an ISO 639-2
3-letter code or an ISO 639-1 2-letter code. As RFC 3066,
to which xml:lang values are supposed to conform, expresses
a preference for ISO 639-1, and Java Locales are built from
the 2-letter codes, this was necessary.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197659
13f79535-47bb-0310-9956-
ffa450edef68
private static final String tag = "$Name$";
private static final String revision = "$Revision$";
+ private String iso639_1Code = null;
+
public LanguageType(int property, String languageCode)
throws PropertyException
{
throw new PropertyException
("Invalid language code: " + languageCode);
setString(code);
+ iso639_1Code = CountryLanguageScript.canonical639_1Code(code);
}
public LanguageType(String propertyName, String languageCode)
}
/**
- * @return the <tt>String</tt> language code.
+ * Gets the ISO 639-2T language code
+ * @return the code.
*/
public String getLanguage() {
return string;
}
+ public String getISO639_1Language() {
+ return iso639_1Code;
+ }
}