<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Length, Energy and Mass formatters should definitely use the ICU backing. It might be a good idea to funnel them all into one unit formatter access point. I personally find it is sometimes easier to interface to C APIs in C and expose them back up as simple funnel methods but it depends on which APIs you are interfacing with so ymmv. The formatters are locale independent in that they should probably just have a simple callout to&nbsp;uameasfmt_format when creating strings from values given a certain unit type.</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 5, 2016, at 1:23 PM, Johan Jensen via swift-corelibs-dev &lt;<a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class=""><div class="">I was having a quick look at implementing some of the not-yet-implemented formatters but quickly realized that some of them are highly locale dependent.<br class=""></div>After a quick look I found <a href="https://github.com/apple/swift-corelibs-foundation/blob/88424c8c533ce903d10b8be2a8b9f30a4c2011aa/bootstrap/x86_64-apple-darwin/usr/local/include/unicode/uameasureformat.h" class="">uameasureformat.h</a> and <span class="">uameasfmt_format() which looks quite interesting.<br class=""></span></div><span class="">Is it possible to use these functions?<br class=""></span></div><span class="">If so, should a Swift wrapper be made?<br class=""></span></div><span class="">If not, how is locale dependent formatters expected to be implemented?<br class=""><br class=""></span></div><span class="">— Johan<br class=""></span></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=0mkChau6XnFV-2FCNUik62L9ZaldD0W0ziOwj-2F3jLx368JGrWc58z8Nq2hDcHU8DkfF-2B-2BaUg-2Besq-2BAGO1pl5-2BZsKMXuSW-2B1-2F6T8Gb2AlRF2O20ZA5GiM3cEWH-2FK0fB-2BJ2u1zVtzPY4J7RmozEkK-2FF4jlBwvFajwPm4m7fK4e-2Fql-2BHcAkVr2PalocWohBFjFMDorUHSTtGUASqb2CDQLsU-2BTkhKzXntinMEFQ1tJ53c91Q-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
_______________________________________________<br class="">swift-corelibs-dev mailing list<br class=""><a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev<br class=""></div></blockquote></div><br class=""></body></html>