Results 1 to 6 of 6

Thread: What language comes back when qm file is loaded?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2009
    Posts
    61
    Thanks
    9
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: What language comes back when qm file is loaded?

    To be honest, I read your first post again and I would provide the same answers, with some exceptions perhaps. The post is confusing. The second post is even more confusing. I've done a lot of tests using different languages not exactly European / American but others as well and I am happy with the results. Obviously, in a multilingual application, you are almost forced to be aware of many things, much more than while coding application in English for English. Well, as you claimed for someone of much stronger expertise in this area, It's nothing more to say but good luck.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: What language comes back when qm file is loaded?

    What language does the user "see" while typing into the line edit?
    What languge is returned when you call text()?
    The translation files translate static text, such as your label, in your program to another language that a reader can understand. This has nothing at all to do with the characters (not language) that are entered into a text box by the operating system when a user types. These strings are returned to you by Qt as the Unicode encoding of the characters the user typed. The characters (actually glyphs) the user sees in the text box are exactly the characters the user would be expecting to see. If they are using a machine with the operating system set for a Turkish keyboard then when they press the lower case dotless i key they see a dotless i, "ı" and a Unicode dotless i character (U+0131) is returned in the text(). If they type the words "hoşça kal" into a text box that is what Qt will give you: it will not magically be translated to English as "goodbye", "bye-bye", "cheerio", "goodday", or even the French loan word "adieu" regardless of translation files. If that same user, on the same machine, switches the keyboard input to US English then types they will expect to see the English alphabet and glyphs when they type "goodbye". The user has the choice of how their keyboard functions and to force it can be downright counter-productive (think about typing a Hebrew sentence referring to a person with an English name).

    If you have a need to store a native language version of a proper name and an Anglicised or romanised version of the name then you have two or more names, you need to store both, and the user will have to give you both as names are routinely romanised differently by different people. For example, someone with the Greek name "ΣτÎ*φανος" might be given the name in English of "Stephen" or "Steven" (or even use the phonetic "Stephanos"). The problem is not limited to two options: "Москва" (ru), "Moscow" (en), "Moscou" (fr), "Moskova" (tr) are all the same city. For some things, like countries, there are international standard codes that can used to partly ameliorate the problem. For similarly limited vocabularies lookup tables can be a workable solution. Some fuzzy matching techniques will also be useful picking up "Stephen" when given "Steven."

    For system user names you can opt to limit the character set permitted in the name, use another identifier such email address that is similarly limited, allow native characters on the understanding that your technical support people are going to be native speakers, or use a meaningless identifier like an id number (1234).

  3. #3
    Join Date
    Nov 2008
    Posts
    183
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: What language comes back when qm file is loaded?

    Thank you for your reply. This is exactly the kind of catastrophe I was expecting.

    The problem is even worse for computers sold in the Asian community in the United states. One of my favorite Chinese buffet type places had one on the bar. It would switch between English and Japanese when you bumped the mouse pointer into a certain region of the screen border. (I know how that sounds, but it really was a Chinese buffet owned by a Japanese family). I suspect there is a large number of these multi-lingual type setups at least in the United States.

    Thanks again.
    Roland

Similar Threads

  1. Serialize class objects to XML file and back
    By StarShaper in forum Qt Programming
    Replies: 2
    Last Post: 25th June 2012, 08:27
  2. Replies: 1
    Last Post: 30th August 2011, 02:01
  3. Why the images from the HTML file is not loaded??
    By rleojoseph in forum Qt Programming
    Replies: 8
    Last Post: 2nd March 2011, 11:29
  4. Replies: 5
    Last Post: 7th May 2010, 13:54
  5. to set date and time in the file info of two days back
    By thomasjoy in forum Qt Programming
    Replies: 1
    Last Post: 11th October 2007, 16:54

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.