Request: better override functionality in locale settings

Martin Klapetek martin.klapetek at gmail.com
Thu Aug 28 08:48:20 UTC 2014


On Thu, Aug 28, 2014 at 10:37 AM, John Layt <john at layt.net> wrote:

> On 28 August 2014 09:28, Martin Klapetek <martin.klapetek at gmail.com>
> wrote:
> > On Wed, Aug 27, 2014 at 11:34 AM, Sebastian Kügler <sebas at kde.org>
> wrote:
> >>
> >>
> >> There's more than just metric and imperial. This page gives you a slight
> >> impression of the complexity:
> >>
> http://en.wikipedia.org/wiki/Imperial_units#Current_use_of_imperial_units
> >>
> >> A binary combobox is just not enough to portray this correctly.
> >
> >
> > I'm actually quite curious what does QLocale do with this complexity. Do
> > they really do
> >
> > if (en_GB) {
> >     beer_unit = pint;
> >     milk_unit = liter;
> >     etc...
> > }
> >
> > That would be quite strange. I'll investigate and post back.
>
> Yes, the locale code for each each category does determine what
> translations will get used for that category.  While Qt doesn't (yet)
> have that level of complexity, other toolkits may, such as glibc or
> gtk or Java or ICU.  We're setting a desktop-wide setting here, not
> just something for KDE/Qt apps only to use.
>

Oh right, the translations.

Well QLocale itself has only 3 values for measurements[1]:

 * Metric
 * ImperialUK
 * ImperialUS

So the complexity as described on the wiki seems to be "taken care of" by
QLocale. However there's no way to set that other than the LC variable,
which brings us back to square one :)

[1] - http://qt-project.org/doc/qt-5/qlocale.html#MeasurementSystem-enum

Cheers
-- 
Martin Klapetek | KDE Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140828/8ded62d9/attachment.html>


More information about the Plasma-devel mailing list