Using xsl to create localized content part 2

FunkSoul

New Member
A slightly different requirement to this questionThe dictionary stays the same format but grows:\[code\]<resources> <text name="property.to.match"> <en_US>The American translation</en_US> <en_GB>The British translation</en_GB> <en>The language localized, but non locale based generic translation</en> </text> <text name="other.property.to.match"> <en>The other language localized, but non locale based generic translation</en> </text <text name="another.property.to.match"> <en>Second generic property</en> </text> <text name="a.label.to.match"> <en>Generic Checkbox label</en> </text> <text name="some.text.to.translate"> <en>This text follows a static bit of text</en> </text></resources>\[/code\]But the document in which I would like to match is more complex:\[code\]<html> <div>Lot's of html</div> <div>[property.to.match]</div> <div> <h1>[other.property.to.match]</h1> <p><img src="http://stackoverflow.com/questions/10344242/x.jpg" />[another.property.to.match]</p> <input type="checkbox"/>[a.label.to.match] <p>Some text that shouldn't be translated followed by [some.text.to.translate] </div></html>\[/code\]So the matcher needs to be able to find multiple text strings within the */text() that start and end with [] but could be in amongst other nodes and bits of untrnaslated text.Thanks again
 
Back
Top