Reputation: 407
Hi I need to read a XML file which carries different locale languages and that should be read through java(not using swing), if using swing also no issue. can anyone pls explain or send me the sample or guideline the way to do this.
Upvotes: 0
Views: 889
Reputation: 35331
We can leave Swing out of the discussion as it has absolutely no bearing on this issue.
Almost all xmlm files I have seen use UTF-8 as encoding which effectively delas with all kind of codepage issues in translating the characters in the file to the respective characters in Java.
Other than that I see little that can go wrong with i18n in XML files.
If the element you use are different for the different languages, then you end up with different schemas. In that case I would use XSLT to translate them to a standard schema before importing them in your app.
Upvotes: 0
Reputation: 328594
Use the normal XML APIs to load the file and ignore anything that you don't need.
Note: An example of the XML would make it possible for use to give you a more detailed answer.
Upvotes: 1