查找国家/地区的距离,货币,温度单位等(iPhone) [英] Finding the distance, currency, temperature units etc. for a country (iPhone)

查看:131
本文介绍了查找国家/地区的距离,货币,温度单位等(iPhone)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序本地化期间,我经历了很多文档,在某处我确定我读到有一种方法可以获得一组与语言环境相关联的单位。

During the localization of my app I went through a lot of documentation, somewhere Im sure I read that there is a way to get a set of units that is linked with the locale.

我相信它说的是基于文化......的单位之类的东西。

I believe it said something like "units based on cultural..." something.

我想以华氏度和英里数显示温度和距离某些国家/地区以及其他国家/地区的摄氏度和公里数。

I would like to display temperature and distance in Fahrenheit and Miles for some countries and Celsius and Kilometers for other countries.

有没有办法在iPhone SDK中访问这些单位的列表。

Is there a way to access a list of these units in the iPhone SDK.

谢谢。

推荐答案

您可以使用 NSLocale 检查货币单位,但是对于帝国与公制,你需要自己制作一个清单

You can use NSLocale to check the currency unit, but for imperial vs. metric you need to make a list yourself.

哎呀。您可以检查英制与公制。有 NSLocaleMeasurementSystem NSLocaleUsesMetricSystem 键。

Oops. You can check for the imperial vs. metric. There is are NSLocaleMeasurementSystem and NSLocaleUsesMetricSystem keys.

这篇关于查找国家/地区的距离,货币,温度单位等(iPhone)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆