Click here to Skip to main content
11,431,483 members (59,163 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: XML XmlReader
can any one please help me how to do this one even any example or
links to do will be appreciated .
i searching in googles and not found any article about this .

The tool should be able to perform the following:

* Open an existing XLIFF file
* Save the modified XLIFF file
* Display the Id (read only)
* Display the un-translated text (read only)
* Display and edit the translated text (read/write)
o Changing the text should automatically change the state to
translated
* Display and edit the translation state as a Boolean (is
translated – read/write). XLIFF supports multiple states; this tool
only cares about translated and needs-translation.
* Allow filtering the displayed data by (filtering will take place
when the Apply Filters buttons is clicked):
o Id
o Un-translated text sub-string
o Translated text sub-string
o Filtered state
Posted 1-Aug-12 8:11am
loger21575
Edited 2-Aug-12 21:20pm
v3
Comments
Kenneth Haugland at 1-Aug-12 13:12pm
   
So you basically want us to search google for you? :)
loger21 at 1-Aug-12 13:17pm
   
no :). I want you share your knowledge and experiment
Sergey Alexandrovich Kryukov at 1-Aug-12 13:23pm
   
This is not a question. I would not expect much help. You probably know the format and semantic of the file and data structures. You don't ask anything in particular. There are no special "professional secrets" except the usual one you may not know, but we have no idea what part of it could be a problem for you. So, what could be a problem except a complete implementation? But who would be interested enough to do the whole work for you?
--SA
loger21 at 1-Aug-12 13:29pm
   
my question is, how to loading XLIFF files using C# ?
Sergey Alexandrovich Kryukov at 1-Aug-12 14:37pm
   
Please see my Solution 3 then.
--SA
Kenneth Haugland at 1-Aug-12 14:51pm
   
I gave your question a 5, I didnt think it was a 2 question so...
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

loger21 asked a follow-up question:
My question is, how to load XLIFF files using C#? [Punctuation/grammar fixed — SA]
The XLIFF file is supposed to be a well-formed XML. If you follow the first approach I explain in my Solution 2, you can write a XLIFF parser based on one of available .NET XML parsers. Here is my short overview of them:

  1. Use System.Xml.XmlDocument class. It implements DOM interface; this way is the easiest and good enough if the size if the document is not too big.
    See http://msdn.microsoft.com/en-us/library/system.xml.xmldocument.aspx[^].

  2. Use the class System.Xml.XmlTextReader; this is the fastest way of reading, especially is you need to skip some data.
    See http://msdn.microsoft.com/en-us/library/system.xml.xmlreader.aspx[^].

  3. Use the class System.Xml.Linq.XDocument; this is the most adequate way similar to that of XmlDocument, supporting LINQ to XML Programming.
    See http://msdn.microsoft.com/en-us/library/system.xml.xmldocument.aspx[^], http://msdn.microsoft.com/en-us/library/bb387063.aspx[^].

—SA
  Permalink  
Comments
loger21 at 2-Aug-12 2:24am
   
thank you.i think this is best way in this case (xlf).
Sergey Alexandrovich Kryukov at 2-Aug-12 12:48pm
   
One of those ways is a must, practically, down this road.
You are welcome.
Good luck, call again.
--SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Please see my comment to the question where I explain why you should not expect much help on this particular topic. But this is just because you don't really need help in a particular topic. Asking for such help does not make a lot of sense. You know why? Because you are missing one of the main features of programming (which is similar to a main trait of the science): you learn general fundamental technologies, not particular application topics, but that helps you to engineer software in many different application fields.

So, if you might need some help, you could be some help in software engineering: approached, platform, languages and techniques. The steps will be: design data structure, the library and the applications, and implement all that.

There are two approaches you could try to consider. First would be making your own CLR-only framework; and another one would be using some native-code framework (try to find one starting from http://en.wikipedia.org/wiki/XLIFF[^]) and using it through P/Invoke:
http://en.wikipedia.org/wiki/P/Invoke[^],
http://msdn.microsoft.com/en-us/library/Aa712982[^].

This CodeProject can also be useful: Essential P/Invoke[^].

One alternative to P/Invoke is to use C++/CLI mixed-mode (managed+unmanaged) project. This project could build a DLL required by the global hooks, but it can contain some managed wrapper CLI code, so, from the standpoint of your .NET application, you can use it as a regular .NET assembly, that is, reference it. Please see:
http://en.wikipedia.org/wiki/C%2B%2B/CLI[^],
http://www.ecma-international.org/publications/standards/Ecma-372.htm[^],
http://msdn.microsoft.com/en-us/library/xey702bw.aspx[^],
http://msdn.microsoft.com/en-us/library/3bstk3k5[^].

But we don't know your current weaknesses. Except one: probably, you are afraid to get to work independently. I did not find any .NET LIFF frameworks, so you probably also don't know any. And you don't have enough bravery to start your own without some external help. I explained above why getting a lot of help is not likely in your case. Now, I can try to offer you a reason why it could be the best for you to get to work, if you have enough or almost enough of knowledge and you are really interested in the result: you can get valuable experience. Besides, you will advance you into a position where you would be able to get effective help from CodeProject (or other) experts, because you would be able to show some problematic code.

There is one more important reason why such experience would help you to get more help: you would be able, after breaking some teeth against the problems, to understand the advice much better.

Just think about it.

—SA
  Permalink  
Comments
Kenneth Haugland at 1-Aug-12 13:44pm
   
My 5! :) (PS. You make my answer seem lame, but that was only becouse it was...) :)
Sergey Alexandrovich Kryukov at 1-Aug-12 14:03pm
   
Thank you, Kenneth.

The only problem with your answer is: the question you referenced is related to XLIFF, but the answer is not, this is a general XML answer which cannot help OP (so, I did not vote).
My whole point is: if OP decides to do the job, her/his questions could be like that, with more chances to get real help... :-)
--SA
Sergey Alexandrovich Kryukov at 1-Aug-12 14:38pm
   
...but OP wasn't probably satisfied, asked another question which I answered in Solution 3.
--SA
Kenneth Haugland at 1-Aug-12 14:46pm
   
I see, XML is XML in other words, it dosnt matter what name it goes by :)
Sergey Alexandrovich Kryukov at 1-Aug-12 14:59pm
   
That is true, but this is not just about names. XML is only one layer, below the semantic layer of XLIF. So, parsing XML is not yet the solution. I answered on this part just because OP specifically asked for it.
--SA
loger21 at 2-Aug-12 2:20am
   
thank you very much :)
Sergey Alexandrovich Kryukov at 2-Aug-12 12:48pm
   
You are very welcome.
--SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Seems this could be done using the existion librarys in .NET. Take a look here:
http://stackoverflow.com/questions/5475167/reading-editing-xliff-using-c-sharp[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web03 | 2.8.150428.2 | Last Updated 3 Aug 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100