"can't understand '{}' as a BCP-47 locale; defaulting to English",
bcp47Locale);
locale = LocaleId.ENGLISH;
}
Tokens tokens = StringTokenizer.tokenizeString(s, locale, "WORD");
return tokens.size();
} catch (Exception e) {
Object[] args = new Object[] { s, bcp47Locale, e };
log.error("unable to count words in string '{}' for locale '{}'",
args);
return 0;