I have to make a program which translates a word from a language to another. Example, if I do translate("Hello","FR") the method must return "Bonjour".
The data is contained in a .NET dictionnary which is in a cache memory zone.
At first, I have to write the translations in a XML file but I don't know how to organize it and how to read it.
I'll have one dictionnary by langage, for example, i'll have
EN which contains 3 keys which are "Bonjour" - "Ola" - "Gutentag" with the same value, which is "Hello".
So, when i'll receive ("Bonjour", "EN"), i'll go in the dictionnary EN and return the value of the key Bonjour.
Bur I really don't see how to organize it in a XML at first to be able to set up all this sytem.
Is this a possibility?
<dico> <en> <traduction id ="bonjour" name="hello"/> <traduction id ="hola" name="hello"/> <traduction id ="dormir" name="to sleep"/> <traduction id ="geld" name="argent"/> <traduction id ="por favor" name="please"/> </en> <fr> ... </fr>
Can you help me please?