Megidolaon wrote:
What is the point of
if (node.Attributes\["Publish"\].InnerText.Trim().Contains(s))
{
return;
}
A check for containting a single letter and then doing nothing?
No, that loop checks if the node text contains one of the non-translatable strings and if so, bails.
Megidolaon wrote:
Maybe the XML contains trailing spaces? Unless you trim them, the XML Nodes' InnerText wouldn't equal the DictionaryEntries with same
You are correct, however within a given call to TranslateNode(), the xml node stays the same. Until it gets translated from the dictionary. Oh crap, there's yet another bug in there that I hadn't noticed - it can double translate. Anyway, the phrase node.Attributes["Publish"].InnerText.Trim() should be invariant, and I assume it takes some processing. So a line like:
string xmlText = node.Attributes\["Publish"\].InnerText.Trim();
and then refering to that string wold have been more efficient,and easier for me to read, I think. -- T