XML files
Thread poster: Terry Richards
Terry Richards
France
Local time: 12:28
French to English
+ ...
Nov 5, 2009

Is it possible to translate xml files in Wordfast? If so, how do you do that?

Thanks in advance,

Terry.


Direct link Reply with quote
 

Lori Cirefice  Identity Verified
France
Local time: 12:28
French to English
Yes - I think you asked this question before ;-) Nov 5, 2009

Yes, but the files have to be properly prepared beforehand, and you have to be careful about encoding issues (an area where I have a lot of issues myself ...)

You need to be somewhat familiar with XML in my opinion. You can use either +Tools or Preptags for the preparation stage. A good text editor will come in handy too.

These two threads should be helpful:

http://www.proz.com/forum/wordfast_support/139232-working_with_xml_in_wordfast.html

http://www.proz.com/forum/cat_tools_technical_help/129839-so_this_is_it_if_i_refuse_to_use_trados_i_cannot_translate_xml_files.html


Direct link Reply with quote
 
Terry Richards
France
Local time: 12:28
French to English
+ ...
TOPIC STARTER
I did. Nov 5, 2009

Thanks Lori,

Now that you mention it, I did indeed ask this question before but I never did get it to work and couldn't take the project.

The problem is that:

1) I open the xml file with word (2003)
No problem.
2) I start WordFast (alt-down)
It says the file needs to be tagged and it does so.
3) Plus tools (I assume) creates a doc file with the tags marked as untranslateable.
Now we're rocking, this is going to be easy!
4) Maybe not, all my accented characters are replaced with garbage.

I've tried the "trick" of pasting from Notepad and saving as UTF-8 text but now Word (and thus WordFast) doesn't recognise it as an XML file. I can translate it but I have to copy over all the tags. Renaming it as XML doesn't help either.

I must be missing something obvious but I've read all the threads and the wordfast pages and everything else I can find and none of them have helped.

T.


Direct link Reply with quote
 

Lori Cirefice  Identity Verified
France
Local time: 12:28
French to English
Preptags Nov 5, 2009

I have that "garbage" problem sometimes with +Tools too, give Preptags a try, it handles certain formats much better. Once they are tagged with preptags, you can translate them as usual in WF.

Direct link Reply with quote
 
Terry Richards
France
Local time: 12:28
French to English
+ ...
TOPIC STARTER
Preptags site is down... Nov 5, 2009

It's not my day

Actually, I can live with the mangled characters as I'm translating FR->EN, the mangled characters are gone after I clean up the file. I just tried a cut-down version of tye file and translated it OK.

This is assuming the customer just wants a simple translation and not a multi-lingual file. I'm checking that with them.

But it would be nice to be able to do it "right"...

T.


Direct link Reply with quote
 

Kristyna Marrero  Identity Verified
United States
Local time: 06:28
XML with Wordfast Pro Nov 10, 2009

Hi Terry,

Have you tried using Wordfast Pro to handle your XML files? The process is pretty simple and you can deliver a translated XML file to your customer (not a multilingual file). You do need a conversion rules file in order to set up the format. You can find the instructions to translate XML files in the online help pages.

Sincerely,

Kristyna


Direct link Reply with quote
 
Terry Richards
France
Local time: 12:28
French to English
+ ...
TOPIC STARTER
I downloaded it... Nov 11, 2009

...and started it up. I spent about 10 minutes trying to figure out how to open a file and my existing TM without success. I obviously need to read the manual and I just don't have time to do that at the moment. Also, I've used tools with a similar interface and actually prefer my classic WordFast so I'm probably resisting it.

I doubt that I will have time to look at it until after Christmas - this is generally my busiest time of year and January is normally my slowest so I've got it pencilled in for then

In the meantime, I need to get this project done (actually, it's on hold as the end customer is messing about, but that's another story...) and I can do that with classic WF.

Terry.


Direct link Reply with quote
 

Jamie Lucero  Identity Verified
United States
Local time: 03:28
French to English
How-to with Pro Nov 18, 2009

Because all XML files have different tags—unlike the standardized HTML format—any XML file requires a custom tag list for a tool to understand the difference between text to translate and tags. Therefore, preparing an XML file for translation without any tag information is going to be time-consuming. In order to open an XML file in Pro, you first need to have a properties file, which contains all the tag information. If this is not provided by your client, which simplifies matters, then you will have to create the properties file yourself.

You will need to open the XML file provided to you with Notepad. Go to File > Save As, change the encoding to UTF-8, and save it. Next, look for the tags that are found on either end of any text to translate. Typically, these are pairs like <![CDATA[ and ]]>, and <field name="something"> and </field>. Next, create a new text file with Notepad and type in the appropriate version of the above external tags, which are designated with the following syntax:

paragraphPrefix.1=<!\\[CDATA\\[
paragraphSuffix.1=\\]\\]>
paragraphFormat.1=html-embedded

and

paragraphPrefix.2=<field[^>].*?>
paragraphSuffix.2=</field>
paragraphFormat.2=html-embedded

Note the use of regular expressions (see http://en.wikipedia.org/wiki/Regular_expression), e.g., <field[^>].*?> instead of <field name="something">. This enables the program to read variations in the tags. Also, the third line in the syntax is to mark up any standard internal HTML tags that are found within the translatable text.

Next, save the text file and change the extension from .txt to .properties. Then open Wordfast Pro, go to Edit > Preferences > Formats, click the new button, and select Text based Filter. Next to Conversion rules, click the [...] button to the right and load the properties file you just created, and click Apply and OK. Now you can open the XML for translation. There could be a few non-standard internal HTML tags that are not recognized, so you can then close the new TXML, delete it, re-open the .properties file with Notepad, and add some internal HTML tag regular expressions, which are designated with the following syntax (these are examples):

internalTag.1=<.*?>
internalTag.2=<[^>].*?>
internalTag.3=&[^ ;]*?;
internalTag.4=\\[[^\\]].*?\\]

After saving the .properties file, re-open the XML for translation. You might have to repeat the the above process in order to add any other missed HTML tags or to add more XML tag sets that contain text to translate.

Hope this helps,
Jamie


Direct link Reply with quote
 

Alessandra Micco  Identity Verified
United States
Local time: 06:28
English to Italian
XML Feb 11, 2015

Hi all,

I came across this thread, because I have a problem with this topic too.
I just got a translation project based on XML files.
I am a word fast pro and macbook user.

I was trying to follow the instructions about this topic on the worfast guidelines but at a certain point I get stuck.
More specifically, my procedure ends at the moment I have to browse conversion rules. The files are not able to be clicked on. In the guideline they mention a program notepad and I also have no idea of what it is. According to some source on the internet, it may be a windows program (that I don't have being a Mac user).
Can anyone give me an insight or enlighten me about this topic as I really feel clueless?

Regards,

Alessandra


Direct link Reply with quote
 

Meta Arkadia
Local time: 18:28
English to Indonesian
+ ...
OS X Alternatives Feb 11, 2015

Alessandra Micco wrote:
that I don't have being a Mac user


There are dozens of Mac alternatives for NotePad, but I'd suggest TextWrangler (free, a 9.9 MB download). To view the XML files without tags, you may want to try SlimBoat (free, a 19 MB download).



Cheers,

Hans


Direct link Reply with quote
 

Dominique Pivard  Identity Verified
Local time: 13:28
Finnish to French
Notepad = TextEdit Feb 11, 2015

Alessandra Micco wrote:
In the guideline they mention a program notepad and I also have no idea of what it is. According to some source on the internet, it may be a windows program (that I don't have being a Mac user).

Notepad is just the standard text editor included in Windows. The equivalent in OS X is TextEdit.


Direct link Reply with quote
 

Meta Arkadia
Local time: 18:28
English to Indonesian
+ ...
WordPad Feb 11, 2015

Dominique Pivard wrote:
The equivalent in OS X is TextEdit.

I'd say the equivalent of TextEdit in Windows is WordPad. And I wouldn't use TextEdit to handle this. But yes, it is possible.

Cheers,

Hans


Direct link Reply with quote
 

Alessandra Micco  Identity Verified
United States
Local time: 06:28
English to Italian
from xml to properties file Feb 12, 2015

Hi Hans,

Thank you for suggesting me those programs.
I still have a problem to solve though. How do I use those programs? what is the procedure?

Regards,

Ale

[Edited at 2015-02-12 23:43 GMT]


Direct link Reply with quote
 

Meta Arkadia
Local time: 18:28
English to Indonesian
+ ...
CATGuru Feb 13, 2015

Alessandra Micco wrote:
How do I use those programs?

Simply right-click on the XML file, and select TextWrangler/SlimBoat to open it.

what is the procedure?

I'm afraid I don't know, I use another CAT tool on my Mac, one that can handle XML files. I bet Dominique can help you out.

Cheers,

Hans


Direct link Reply with quote
 

John Di Rico  Identity Verified
France
Local time: 12:28
Member (2006)
French to English
Sublime text Feb 13, 2015

Hi Alessandra,

Have you also been to this page? http://www.wordfast.net/wiki/Translation_of_XML_Files

I just learned about a great text editor called Sublime Text. I like that it color codes: http://screencast.com/t/creX964S

When you save as, you can save it as a .properties file.

XML can be tricky, but it is definitely doable. You can also contact the support hotline if all else fails.

Hope this helps,

John Di Rico

Wordfast
Manager, Training and Sales

Register today for the Wordfast Forward User Conference in Riga, Latvia - May 28-31, 2015: http://www.wordfast.com/conference


Direct link Reply with quote
 


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


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

XML files

Advanced search


Translation news related to Wordfast





WordFinder
The words you want Anywhere, Anytime

WordFinder is the market's fastest and easiest way of finding the right word, term, translation or synonym in one or more dictionaries. In our assortment you can choose among more than 120 dictionaries in 15 languages from leading publishers.

More info »
Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »



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