Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cretaing an Excel language dictionary from xml files

Status
Not open for further replies.

richiwatts

Technical User
Jun 21, 2002
180
GB
I have a number of language files in xml. Each language has its own xml file. The onyl thing that is the same in each file is the name= tag

English.xml
<DEFAULTSTRING name="button_double">Double</DEFAULTSTRING>

Swedish.xml
<DEFAULTSTRING name="button_double">Dubbla</DEFAULTSTRING>

French.xml
<DEFAULTSTRING name="button_double">Doubler</DEFAULTSTRING>

The English was the original and has more strings than most of the langguage files. I need to create a dictionary in Excel so I just have 1 file with

name= > English > Swedish > French
button_double > Double > Dubbla > Doubler

Each file has about 100 strings and they are not in alphabetical order.

Can anyone think of a clever way to handle this?

Rich
 
Rich,

This is easily accomplished using XSLT.

My approach would be to use a two step process.

The first step would be simply to use the document() function to create a single XML document, where you have the actual languages encoded in the document, rather than implicit in the name of the document.

The second step is the application of grouping to your strings, based upon the value of the name attribute. This has been described in the following recent threads:[ul][li]thread426-1210886[/li]
[li]thread426-1328351[/li]
[li]thread426-1332802[/li][/ul]



Tom Morrison
 
Pretty simple (I think anyway) take one actual XML Files and Import it into excel. Go under data>>> XML>>> XML maps>>> That is The same thing as your schema... The only thing you would need to do is incert the appropriate language inside the proper cell... It may be a little more advanced than that. I cant see the actual document to direct you any further.... There are ways though....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top