<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Aug 28, 2014 at 10:37 AM, John Layt <span dir="ltr"><<a href="mailto:john@layt.net" target="_blank">john@layt.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

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

<div> * ImperialUK</div><div> * ImperialUS</div><div><br></div><div>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 :)</div>

<div><br></div><div>[1] - <a href="http://qt-project.org/doc/qt-5/qlocale.html#MeasurementSystem-enum">http://qt-project.org/doc/qt-5/qlocale.html#MeasurementSystem-enum</a><br></div><div><br></div></div><div>Cheers</div>

-- <br><div><span style="color:rgb(102,102,102)">Martin Klapetek | KDE Developer</span></div>
</div></div>