XML file with multiple languages
-
wrote on 25 Mar 2014, 14:39 last edited by
Hello, I need some tips. I have an XML file that has multiple words in different languages. Is is possible to correctly load the file and the contents ? Some of the contents are in Spanish, French and Ukrainian. Right now I'm using QXmlInputSource and QXmlSimpleReader to parse the file. It works good to parse the FR and SP words, but the Ukrainian appears has ????.
E.G of the XML file:
<BTN name="ui_1" fr="Menu" sp="Menu" ur="Меню"></BTN>Any ideas ?
Can my app be multi language ? -
Yes, it should be possible. Make sure the file is opened in UTF-8 mode.
If you want this to translate your application, why not use the built-in Qt translation system?
-
wrote on 25 Mar 2014, 18:12 last edited by
In my case I wanted to make a personalized translation mechanism. The things is, if I use encoding="iso-8859-1" at the XML file the chars appear correct, but if I use UTF-8, I get ??? for the Ukrainian chars. ideas ?
-
wrote on 25 Mar 2014, 18:25 last edited by
Usually the characters that are not supported are replaced by ???
Have you saved the file in UTF-8?
1/4