I was exploring the HealthKit APIs and was surprised not to find a method like name
on HKObjectType
, HKSampleType
, HKQuantityTypeIdentifier
, or HKQuantityType
.
Is there not a way in HealthKit to return a localized display name of a quantity like HKQuantityTypeIdentifierDietaryThiamin
, so that 3rd party apps use the same strings to represent types as the Health app does?
For instance, convert the quantity type identified by HKQuantityTypeIdentifierBodyMassIndex
to the localized human-readable string "Body Mass Index"
as Apple does in the Health app.
Should we translate these medical terms ourselves at our own discretion?
As far as I know, at the moment HealthKit
(as for iOs 8.0.2) don't have a direct API for such a thing. Basically it is the developer responsibility to localize the name of a sample type as well as the units. (though there are associated tools to localize the units).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With