quote:
Originally posted by -dt-
because then i would have to have like 5 copies of the interface files (which are pretty big) and if i updated one interface i would have to go through and edit each one , keeping them as strings in a different file is smaller and works nicer..... just i keep missing some
You can modify interface files when a new language is selected (only for titles)
for example :
code:
var sNewTitle = "My new title from language file";
var xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
var node;
xmlDoc.async="false";
xmlDoc.load("rssinterface.xml");
node = xmlDoc.selectSingleNode('/Interfaces/Window[@Id="rssReaderConf"]/Attributes/Caption/text()');
node.text = sNewTitle;
node = xmlDoc.selectSingleNode('/Interfaces/Window[@Id="rssReaderConf"]/TitleBar/Title/Text/text()');
node.text = sNewTitle;
xmlDoc.save("rssinterface.xml");
rssinterface.xml :
code:
<Window Id="rssReaderConf" Version="1">
<Attributes>
<Caption>My new title from language file</Caption>
</Attributes>
<TitleBar>
<Title><Text>My new title from language file</Text></Title>
</TitleBar>
...