I am doing a complex language translation in jQuery. I am copying some of the methods used in the jQuery/Google translate, but using our own XML files for getting original English and translated languages.
I am able to easily read English and other language into an array.
But my problem is that some of these text phrases, that we are paying someone to have translated, are going to be inside other sentences inside many different pages.
I have been blasting away, trying different approaches, and still no real luck in finding a useable solution.
In past efforts, I have used the $('body').nodesContainingText() from jQuery-translate, to parse through each text node, then search for that text inside the English array, grab that position, and use that to get the translated version in the other language array.
And that works fine where there are separate text nodes, but still not even close to consistently working on partial replacing.
Seems the more I try to fix the problem, the less it works.
So what I'd really like is some guidance about what I am doing wrong?
Here is the code I am using, maybe this will help.