Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. XML file with multiple languages
Forum Updated to NodeBB v4.3 + New Features

XML file with multiple languages

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 968 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    silvador
    wrote on last edited by
    #1

    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 ?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      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?

      (Z(:^

      1 Reply Last reply
      0
      • S Offline
        S Offline
        silvador
        wrote on last edited by
        #3

        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 ?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andreyc
          wrote on last edited by
          #4

          Usually the characters that are not supported are replaced by ???
          Have you saved the file in UTF-8?

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved