Easiest way to translate an HTML/XML file ?
Thread poster: Arturo Villasenor Garcia

Arturo Villasenor Garcia  Identity Verified
Mexico
Local time: 12:19
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


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?


 

Josephine Cassar  Identity Verified
Local time: 19:19
Member (2012)
Italian to English
+ ...
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  Identity Verified
Serbia
Local time: 19:19
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  Identity Verified
Spain
Local time: 19:19
Member (2009)
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):

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.


 

Arturo Villasenor Garcia  Identity Verified
Mexico
Local time: 12:19
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  Identity Verified
Spain
Local time: 19:19
Member (2009)
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 ?

Advanced search






PerfectIt consistency checker
Faster Checking, Greater Accuracy

PerfectIt helps deliver error-free documents. It improves consistency, ensures quality and helps to enforce style guides. It’s a powerful tool for pro users, and comes with the assurance of a 30-day money back guarantee.

More info »
memoQ translator pro
Kilgray's memoQ is the world's fastest developing integrated localization & translation environment rendering you more productive and efficient.

With our advanced file filters, unlimited language and advanced file support, memoQ translator pro has been designed for translators and reviewers who work on their own, with other translators or in team-based translation projects.

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search