public static HyphenationTree GetResourceHyphenationTree(String key) {
try {
Stream stream = BaseFont.GetResourceStream(defaultHyphLocation + key + ".xml");
if (stream == null && key.Length > 2)
stream = BaseFont.GetResourceStream(defaultHyphLocation + key.Substring(0, 2) + ".xml");
if (stream == null)
return null;
HyphenationTree hTree = new HyphenationTree();
hTree.LoadSimplePatterns(stream);
return hTree;
}
catch {
return null;
}
}