Easiest way to translate an HTML/XML file ?
Thread poster: Arturo Villasenor Garcia
Arturo Villasenor Garcia
Arturo Villasenor Garcia  Identity Verified
Mexico
Local time: 06:23
Spanish to English
+ ...
Mar 15, 2013

I have a client that wants to get an HTML/XML sitemap file translated. Each sentence in the file look like this:


lbl_name_of_purchaser;"The buyer's name";;Labels



But the only part that needs to be translated is the part inside " " So I need an Excel formula or an online site that would allow to edit only that " " part without changing the rest. Like something that would clean the file leaving only the phrase such as:

The buyer's name... See more
I have a client that wants to get an HTML/XML sitemap file translated. Each sentence in the file look like this:


lbl_name_of_purchaser;"The buyer's name";;Labels



But the only part that needs to be translated is the part inside " " So I need an Excel formula or an online site that would allow to edit only that " " part without changing the rest. Like something that would clean the file leaving only the phrase such as:

The buyer's name


for me to translate it to Spanish, e.g:


Nombre del Comprador


and then automatically or through a button add it to the rest of the html/xml sentence, e.g:



lbl_name_of_purchaser;"Nombre del Comprador";;Labels


Otherwise I would have to go line by line clicking inside the " " to edit it and it would be too tedious and time consuming.


Any ideas?
Collapse


 
Josephine Cassar
Josephine Cassar  Identity Verified
Malta
Local time: 14:23
Member (2012)
English to Maltese
+ ...
Easiest way to translate Mar 15, 2013

I got the same "application" filled it but found it difficult to send and wondered whether I would have the same problem working for them, so decided not to send them anything as not worth the hassle. sorry, that is my response and seeing your post, convinced me I made the right decision, with all those signs etc.

 
Cedomir Pusica
Cedomir Pusica  Identity Verified
Serbia
Local time: 14:23
Member (2009)
English to Serbian
+ ...
Do you use any CAT tool? Mar 15, 2013

If so, you should deal with the issue using the Regex tagger (memoQ). These are regular expressions. You should enter the formula and the program would tag the text you don't want to translate, while leaving the rest.

If you need any more help, let me know.


 
Alex Lago
Alex Lago  Identity Verified
Spain
Local time: 14:23
English to Spanish
+ ...
Do you have a CAT tool? Mar 15, 2013

I know a method that will work with Wordfast Pro by converting the text into hidden text, as Wordfast Pro does not take hidden text you will only see the text you need to translate.

I imagine other CAT tools work in a similar fashion but I only have Wordfast Pro so can't vouch f it will work with other CAT tools.

This is a bit lengthy to explain but is very quick and easy to do (this is for Word 2010 if you have another version it might be slightly different):
... See more
I know a method that will work with Wordfast Pro by converting the text into hidden text, as Wordfast Pro does not take hidden text you will only see the text you need to translate.

I imagine other CAT tools work in a similar fashion but I only have Wordfast Pro so can't vouch f it will work with other CAT tools.

This is a bit lengthy to explain but is very quick and easy to do (this is for Word 2010 if you have another version it might be slightly different):

Open the file in Microsoft Word.

Select all the text in the file.

Click on "Font" and select "Hidden" so that all the text in the file is Hidden text.

Now click on Files > Options > Proofing

Click on AutoCorrect Options

Click on Autoformat and make sure that Replace "Straight quotes" with "smart quotes" is selected.

Now press Ctrl+H to go to Find/Replace

Make sure the "Use wildcards" option is selected.

Now replace " with " (all quotation marks with themselves), which will replace any straight quotes in the document with smart quotes.

Now in find what type (“)(*)(”), you have to include the parenthesis and make sure the quotes are smart quotes (to do that type alt+0147 for the first quote and alt+0148 for the second) this part is crucial. The asterisk in the second of parenthesis set stands for "any characters," so it will copy anything in-between the quotes.

In replace with leave blank (no spaces or anything, it must be blank) so make sure you erase the quote mark from the previous replace operation, with the cursor in the "Replace with" box click on "Format", choose "Font" and make sure the "Hidden" option is not selected (you can ignore all the other options) and click "OK", now click "Replace All", this will replace all the text between quote marks for itself but with "Not Hidden" format, so now the only text in the file that is not Hidden is the text between quote marks.

Save the file and open with Wordfast, only text "Not Hidden" text will appear in Wordfast, translate the text and use Wordfast to reconstruct the file. Once the file is reconstructed select all the text and remove the "Hidden" formatting, do that by clicking on "Font" and marking the "Hidden" option as not selected.

Hope this has been clear enough.
Collapse


 
Arturo Villasenor Garcia
Arturo Villasenor Garcia  Identity Verified
Mexico
Local time: 06:23
Spanish to English
+ ...
TOPIC STARTER
how Mar 16, 2013

Alex: I didn't understand anything!

Cedomir: What's the Regex tagger? where do I download it, how do I use it?, free?


 
Alex Lago
Alex Lago  Identity Verified
Spain
Local time: 14:23
English to Spanish
+ ...
Sorry Mar 16, 2013

Sorry this is the easiest way I can think to do it but if you don't know how to use Microsoft Word I don't know how else to explain it.

 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Easiest way to translate an HTML/XML file ?






Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

Buy now! »
CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

Buy now! »