Opened 9 years ago

Closed 9 years ago

#123 closed enhancement (fixed)

Derive language settings from the system

Reported by: dmik Owned by:
Priority: blocker Milestone: Qt 4.6.2
Component: QtCore Version: 4.5.1 Beta 5
Severity: low Keywords:
Cc:

Description

Currently, Qt relies on the LANG environment variable to detect the country and language of the system locale. This information should be rather taken directly from the system.

Change History (2)

comment:1 Changed 9 years ago by dmik

  • Component changed from General to QtCore

comment:2 Changed 9 years ago by dmik

  • Resolution set to fixed
  • Status changed from new to closed

Done in r622. Now, the language is derived from the country code of the current process if the LANG environment variable is not set or empty.

Also, I implemented getting the values for the default Qt locale (such as decimal separators, time and date formats, month names, etc.) from the system locale object (the one you can set up using the Country Palette found in the System Setup folder of the WPS desktop). However, at least for Russian, the system locale definition seems to be quite bogus (in particular, there is a wrong time separator in the full date format, also the case of the month is wrong and so on); the locale definitions provided by Qt for "ru_RU" are more correct. I suspect that the same takes place for other locale definitions too.

For this reason, since r623, the definitions from the system locale object are only used if the QT_PM_SYSTEM_LOCALE environment variable is set and no QT_PM_NO_SYSTEM_LOCALE is set (I described this in README.OS2).

Note: See TracTickets for help on using tickets.