public static HyphenationTree GetHyphenationTree(String lang,
String country) {
String key = lang;
// check whether the country code has been used
if (country != null && !country.Equals("none")) {
key += "_" + country;
}
// first try to find it in the cache
if (hyphenTrees.ContainsKey(key)) {
return (HyphenationTree)hyphenTrees[key];
}
if (hyphenTrees.ContainsKey(lang)) {
return (HyphenationTree)hyphenTrees[lang];
}
HyphenationTree hTree = GetResourceHyphenationTree(key);
//if (hTree == null)
// hTree = GetFileHyphenationTree(key);
// put it into the pattern cache
if (hTree != null) {
hyphenTrees[key] = hTree;
}
return hTree;
}