* @throws ConfigException if settings are invalid
*/
private Locale createLocale() throws ConfigException {
if (language == null) {
if (country != null || variant != null) {
throw new ConfigException("Must not specify country or variant without language in '" + toInlineString() + "'");
}
return new Locale("", "");
} else {
if (country == null) {
if (variant != null) {
throw new ConfigException("Must not specify variant without country in '" + toInlineString() + "'");
}
return new Locale(language, "");
} else {
if (variant == null) {
return new Locale(language, country);