SexyMF
SexyMF

Reputation: 11155

Translate strings in xml file

I have an XML file that I want to send out for translations. this is the unique structure:

<Lang name="en-us">
        <Fields>
            <Item name="FirstName" label="First Name" tooltip="Please provide your {0}" error="{0} Is not valid"></Item>
            <Item name="LastName" label="Last Name" tooltip="Please provide your {0}" error="{0} Is not valid"></Item>
            <Item name="Address" label="Address" tooltip="Please provide your Address {0}" error="{0} Is not valid"></Item>
            <Item name="CountryShortName" label="Country" tooltip="Please select your {0}" error="you must select your {0}">
                <Data name="IL" value="Israel"></Data>
                <Data name="US" value="USA"></Data>
                <Data name="DE" value="Jermany"></Data>
            </Item>
        <Fields>
   <Langs>

I don't want to send the translation company this XML because they will charge me double.
Is there anyway that I can somehow convert it to excel, send it and then reconvert to XML?
(the string are located in Atrributes).

Upvotes: 2

Views: 2005

Answers (2)

Raghuram
Raghuram

Reputation: 3967

You can use XSLT to convert the xml to CSV file and then have a script to convert the CSV to XML. I have used XSLT to convert XML to CSV but not the reverse.

Upvotes: 0

Jon Egerton
Jon Egerton

Reputation: 41539

Excel has functionality for mapping to and from xml files.

You can start from here: http://office.microsoft.com/en-us/excel-help/map-and-unmap-xml-elements-HP010206397.aspx, and I'm sure there will be more online about setting this up

Upvotes: 2

Related Questions