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. QLocale::system()
Forum Updated to NodeBB v4.3 + New Features

QLocale::system()

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.1k 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.
  • J Offline
    J Offline
    Jupiter
    wrote on last edited by
    #1

    hi,

    i have following code:

    @QString languageName = systemLocale.name().left(2);@

    when i run it on windows, it returns my os language ("de").
    when i run it on mac OS lion, it returns "c". is this a bug?

    thanks

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      No, C is a valid locale. Basically it is "use no translation at all".

      Check the environment you are running your application in for the LC_* and LANG variables. Maybe something is forcing them to C. We do that in Qt Creator sometimes when we need to make sure to get parse-able output from the applications we run (e.g. the compiler).

      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