jQuery in Action, 2nd edition*
The moose likes XML and Related Technologies and the fly likes Convert Text File (.txt) into XLIFF. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Convert Text File (.txt) into XLIFF." Watch "Convert Text File (.txt) into XLIFF." New topic
Author

Convert Text File (.txt) into XLIFF.

Rohit More
Greenhorn

Joined: May 06, 2013
Posts: 10

Hello Everyone ,
I want to convert txt file into XLIFF. but I am unable to get its properties which I have applied.
properties Like :
its font , size, font- style

and I am newly entered in XLIFF. so dont know much, If anyone have good conversion document
so kindly requesting you to please provide me documents/ tutorial and sample code too.

Thanking you
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41182
    
  45
Just briefly looking at it (XLIFF), it would seems that XLIFF concerns itself with text, not its formatting. (Edit: I stand corrected. Apparently the ctype and font attributes are meant for carrying just this information.)

What, exactly, do you mean by "which I have applied"? What was the input, how was processing done, what was the output, and how did that differ from what you expected it to be?


Ping & DNS - my free Android networking tools app
Rohit More
Greenhorn

Joined: May 06, 2013
Posts: 10

Ulf Dittmer wrote:Just briefly looking at it (XLIFF), it would seems that XLIFF concerns itself with text, not its formatting. (Edit: I stand corrected. Apparently the ctype and font attributes are meant for carrying just this information.)


Exactly, It used to carries its formatting too by using attributes.

Ulf Dittmer wrote: What, exactly, do you mean by "which I have applied"? What was the input, how was processing done, what was the output, and how did that differ from what you expected it to be?


---

I created simple demo.txt file.
and enter some no of sentences and applied font is "Verdana" font style is "Bold" and Font size is 10. I am making its segment looking towards the sentence.
now I am reading that file contents and storing that into <trans-unit> tag. issue is I am unable to get content's properties, like its font type is Verdana or something different likewise.
now how do I get its properties?

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41182
    
  45
Raw Text files have no formatting. You need to use an API that can get at the formatting information for whatever document format you have - Apache POI comes to mind for DOC and DOCX files.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Convert Text File (.txt) into XLIFF.
 
Similar Threads
Reducing the File Size
MenuItem font setting
a question about File class(urgent)
Setting Font while writing to a Text File
Log4J Configuration