private static string Get(string id, XmlDocument locale) { string[] categories = id.Split(new char[] { ',' }); XmlItem xi = locale.Root; foreach (string category in categories) { int i = xi.Find(category); if (i == -1) { return(null); } xi = xi[i]; } return(xi.GetProp("Text")); }
private static string Get(string id, XmlDocument locale) { string[] categories = id.Split(new char[] { ',' }); XmlItem xi = locale.Root; foreach (string category in categories) { int i = xi.Find(category); if (i == -1) { return(id + " " + FBadResult); } xi = xi[i]; } string result = xi.GetProp("Text"); if (result == "") { result = id + " " + FBadResult; } return(result); }