Using xsl to create localized content

ehsanshamsi

New Member
Given an input file with the following structure:\[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</resources>\[/code\]And a template file that I can read into the stylesheet with the following structure:\[code\]<html> <div>Lot's of html</div> <div>[property.to.match]</div> <div>[other.property.to.match]</div></html>\[/code\]How can I get an xsl to output a localized version of the template... So for example, if I pass en_US as a parameter to the stylesheet I would like the following output:\[code\]<html> <div>Lot's of html</div> <div>The American translation</div> <div>The other language localized, but non locale based generic translation</div></html>\[/code\]Thanks.
 
Top