Win a copy of Pragmatic AI this week in the Artificial Intelligence forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Convert Text File (.txt) into XLIFF.  RSS feed

 
Greenhorn
Posts: 10
Hibernate Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Rohit More
Greenhorn
Posts: 10
Hibernate Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!