Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 45
Registered: ‎07-29-2008
My Device: Z10 Red, 8900, PlayBook
My Carrier: E-Plus

How is QLocale::MeasurementSystem set?

Hi,

 

how is the QLocale::MeasurementSystem working? To me it seems that the value depends only the current language and not on the current setting of "Measurement System" in System Settings - Language and Input.

 

The Distance Measurement can be switch between Feet and Yard. Can I access this setting via QLocale too?

Klaus Nahr
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: How is QLocale::MeasurementSystem set?

You can use https://developer.blackberry.com/cascades/reference/bb__system__localehandler.html to get to that measurement system setting.

 

I'm not aware of a way to retrieve the Feet/Yards switch yet, but I haven't looked for it at all either.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 45
Registered: ‎07-29-2008
My Device: Z10 Red, 8900, PlayBook
My Carrier: E-Plus

Re: How is QLocale::MeasurementSystem set?

As far as I tested, changing the Region has no effect on QLocale::MeasurementSystem, only changing the language.

 

For example: If the language is German and the region United States, the QLocale::MeasurementSystem is still Metric. When changing the language to English, the QLocale::MeasurementSystem switches to Imperial.

 

For language English and region India (HIndi) the QLocale::MeasurementSystem is Imperial, which is wrong, as they are using Metric. At least in Language and Input Metric is shown.

 

Klaus Nahr
Highlighted
New Contributor
Posts: 6
Registered: ‎12-14-2012
My Device: Z10 Limited Edition
My Carrier: Claro

How retrieve current MeasurementSystem ?

Any news about this problem?

 

I think this system settings can be read with "System UI" but do not understand how: http://developer.blackberry.com/cascades/reference/user_interface_system_ui.html

 

Any idea?