Opened 15 years ago
Closed 15 years ago
#123 closed enhancement (fixed)
Derive language settings from the system
Reported by: | Dmitry A. Kuminov | 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 by , 15 years ago
Component: | General → QtCore |
---|
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
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).