Multilingual program with xml

shay

New Member
I want implement multiple languages in my program. I'm using an xml file like this one:\[code\] <?xml version="1.0" encoding="utf-8"?><root> <language id="EN"> <String id="rxtst_found">.rxtst found</String> <String id="exe_found">.exe found</String> <String id="rxtst_not_found">No .rxtst found</String> <String id="exe_not_found">No .exe Found</String> </language> <language id="DE"> <String id="exe_found">.exe gefunden</String> <String id="rxtst_found">.rxtst gefunden</String> <String id="rxtst_not_found">Keine .rxtst gefunden</String> <String id="exe_not_found">Keine .exe gefunden</String> </language> </root>\[/code\]I want to call the language like this:\[code\]getStringValue(String string_id, language lang) ...\[/code\]Whats the best way to parse the language correctly?I thought about something like\[code\] XmlNodeList xmlNodesByLanguage = xdoc.GetElementsByTagName("language");... String tempLang = xmlNodesByLanguage.Item(i).Attributes["id"].Value;\[/code\]But I have no clue...
 
Back
Top