Click here to Skip to main content
12,890,288 members (48,636 online)
Rate this:
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
* 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 7:11am
Updated 2-Aug-12 20:20pm
Kenneth Haugland 1-Aug-12 13:12pm
So you basically want us to search google for you? :)
loger21 1-Aug-12 13:17pm
no :). I want you share your knowledge and experiment
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?
loger21 1-Aug-12 13:29pm
my question is, how to loading XLIFF files using C# ?
Please see my Solution 3 then.
Kenneth Haugland 1-Aug-12 14:51pm
I gave your question a 5, I didnt think it was a 2 question so...
Rate this: bad
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.

  2. Use the class System.Xml.XmlTextReader; this is the fastest way of reading, especially is you need to skip some data.

  3. Use the class System.Xml.Linq.XDocument; this is the most adequate way similar to that of XmlDocument, supporting LINQ to XML Programming.

loger21 2-Aug-12 2:24am
thank you.i think this is best way in this case (xlf).
One of those ways is a must, practically, down this road.
You are welcome.
Good luck, call again.
Rate this: bad
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[^]) and using it through P/Invoke:[^],[^].

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:[^],[^],[^],[^].

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.

Kenneth Haugland 1-Aug-12 13:44pm
My 5! :) (PS. You make my answer seem lame, but that was only becouse it was...) :)
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... :-)
...but OP wasn't probably satisfied, asked another question which I answered in Solution 3.
Kenneth Haugland 1-Aug-12 14:46pm
I see, XML is XML in other words, it dosnt matter what name it goes by :)
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.
loger21 2-Aug-12 2:20am
thank you very much :)
You are very welcome.
Rate this: bad
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:[^]

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170424.1 | Last Updated 3 Aug 2012
Copyright © CodeProject, 1999-2017
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