Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gloriaconcepto/03cb381115ea950acf883066a11ff050 to your computer and use it in GitHub Desktop.
Save gloriaconcepto/03cb381115ea950acf883066a11ff050 to your computer and use it in GitHub Desktop.
List of iOS locales with currency formatting.
The following list lists "1205.34" float number formatted with all possible iOS locales.
--------
Some of popular locales:
pl_PL = 1 205,34 zł
en_US = $1,205.34
en_GB = £1,205.34
en_IE = €1,205.34
de_DE = 1.205,34 €
fr_FR = 1 205,34 €
br_FR = € 1 205,34
ja_JP = ¥1,205
pt_TL = 1 205,34 US$
fr_CA = 1 205,34 $
en_CA = $1,205.34
--------
All possible locales:
en_IE = €1,205.34
ro_MD = 1.205,34 MDL
br = ¤ 1 205,34
en_GY = $1,205
es_GT = Q1,205.34
shi-Tfng_M = 1 205,34MAD
mr = ¤१,२०५.३४
bs = ¤ 1.205,34
en_AS = $1,205.34
ksf = 1 205,34 ¤
bs-Cyrl = 1.205,34 ¤
en_PR = $1,205.34
ms = ¤1,205.34
sr-Latn_ME = 1.205,34 €
mt = ¤1,205.34
ha = ¤ 1,205.34
nb_NO = kr 1 205,34
en_SE = 1 205:34 SEK
en_BZ = $1,205.34
pt_BR = R$1.205,34
or_IN = ₹ 1,205.34
is_IS = kr1.205
mn_MN = ₮ 1 205
ar_IQ = ١٢٠٥ د.ع.‏
he = 1,205.34 ¤
it_SM = € 1.205,34
en_AT = € 1.205,34
bas = 1 205,34 ¤
ckb = ¤ ١٬٢٠٥٫٣٤
my = ¤ ၁,၂၀၅.၃၄
zh_CN = ¥1,205.34
mer = ¤1,205.34
ks-Arab_IN = ₹ ۱٬۲۰۵٫۳۴
en_JM = $1,205.34
dz_BT = Nu.༡,༢༠༥.༣༤
ms-Arab_BN = $ 1.205,34
cy_GB = £1,205.34
sg = ¤1.205,34
it_CH = CHF 1'205.34
teo_KE = Ksh1,205.34
de_LU = 1.205,34 €
en_US = $1,205.34
hi = ¤ 1,205.34
hu_HU = 1 205 Ft
uz-Latn_UZ = сўм 1,205
af_NA = $ 1 205,34
si = ¤ 1,205.34
fr_BI = 1 205 FBu
ga_IE = €1,205.34
mfe = ¤ 1 205.34
en_CA = $1,205.34
ne_IN = ₹ १,२०५.३४
rwk_TZ = 1,205TSh
en_AU = $1,205.34
sk = 1 205,34 ¤
teo = ¤1,205.34
en_PT = 1 205,34 €
en_NG = ₦1,205.34
sl = ¤1.205,34
tk_TM = 1 205,34m.
tzm = 1 205,34 ¤
ee_GH = GH₵1,205.34
kde = ¤1,205.34
sn = ¤1,205.34
dyo_SN = 1 205 CFA
en_SG = $1,205.34
mas_TZ = TSh1,205
so = ¤1,205.34
nyn_UG = USh1,205
br_FR = € 1 205,34
fr_BJ = 1 205 CFA
es_IC = 1.205,34 €
pt_MZ = 1 205,34 MTn
hr = 1.205,34 ¤
az = ¤ 1.205,34
sq = ¤1 205,34
sr = 1.205,34 ¤
sw_KE = Ksh1,205.34
ca = ¤1.205,34
hu = 1 205,34 ¤
et_EE = 1 205,34 €
lag_TZ = TSh 1,205
bn_IN = ১,২০৫.৩৪₹
nb = ¤ 1 205,34
sv = 1 205:34 ¤
th_TH = ฿1,205.34
ml_IN = 1,205.34₹
sr_RS = 1.205 дин.
sw = ¤1,205.34
nd = ¤1,205.34
ta_IN = ₹ 1,205.34
fr_MQ = 1 205,34 €
hy = 1205,34 ¤
en_TO = T$1,205.34
es_AR = $1.205,34
ne = ¤ १,२०५.३४
pt_AO = 1 205,34 Kz
ne_NP = नेरू १,२०५.३४
ar_BH = ١٢٠٥٫٣٤٠ د.ب.‏
en_SI = €1.205,34
bo_IN = ₹ 1,205.34
hi_IN = ₹ 1,205.34
seh = 1.205,34¤
de_DE = 1.205,34 €
ko_KP = KPW1,205
fr_BL = 1 205,34 €
fr_MR = 1 205 UM
ca_AD = €1.205,34
fa_IR = ‎﷼۱٬۲۰۵
nl = ¤ 1.205,34
es_PR = $1,205.34
en_PW = $1,205.34
rn_BI = 1.205FBu
nn = 1 205,34 ¤
kk = 1 205,34 ¤
en_DK = 1.205,34 DKK
sl_SI = €1.205,34
dua = 1 205,34 ¤
kea = 1.205,34¤
ms-Arab_MY = RM1,205.34
ig_NG = ₦1,205.34
kln = ¤1,205.34
yo = ¤1,205.34
fr_DZ = 1 205,34 DA
sv_FI = 1 205:34 €
fr_SY = 1 205 LS
ru_MD = 1 205,34 MDL
en_ZW = US$1,205.34
brx_IN = ₹ 1,205.34
sw_UG = USh1,205
fil_PH = ₱1,205.34
cs = 1 205,34 ¤
pt_GW = 1 205 CFA
bn_BD = ১,২০৫.৩৪৳
de_AT = € 1.205,34
fr_PF = 1 205 FCFP
luo = 1,205.34¤
sk_SK = 1 205,34 €
ar_001 = ١٢٠٥٫٣٤ ¤
es_US = $1,205.34
en_SK = 1 205,34 €
ta = ¤ 1,205.34
fr_HT = 1 205,34 G
mk_MK = ден 1.205,34
om_KE = Ksh1,205.34
da_DK = 1.205,34 kr
en_ME = 1.205,34 €
ko_KR = ₩1,205
ff_SN = 1 205 CFA
id = ¤1.205,34
en_KY = $1,205.34
kde_TZ = TSh1,205
shi = 1 205,34¤
cy = ¤1,205.34
en_ES = 1.205,34 €
mgh = ¤ 1.205,34
en_TR = 1.205,34 TRY
sr_ME = 1.205,34 €
te = ¤1,205.34
fr_GN = 1 205 FG
fo_FO = kr1.205,34
en_NL = € 1.205,34
ig = ¤1,205.34
it_IT = € 1.205,34
uk_UA = 1 205,34 ₴
tg = ¤ 1,205.34
en_DM = EC$1,205.34
bm_ML = CFA1,205
vai = ¤1,205.34
en_SL = Le1,205
ii = ¤ 1,205.34
en_150 = 1.205,34 €
ses = 1 205.34¤
th = ¤1,205.34
ti = ¤1,205.34
en_IM = £1,205.34
ru_KZ = 1 205,34 ₸
fr_MU = 1 205 Rs
iu-Cans_CA = CA$ 1,205.34
cs_CZ = 1 205,34 Kč
ar_AE = ١٢٠٥٫٣٤ د.إ.‏
te_IN = ₹1,205.34
tk = 1 205,34¤
brx = ¤ 1,205.34
haw = ¤1,205.34
tzm_MA = 1 205,34 MAD
so_DJ = Fdj1,205
uz_UZ = сўм 1,205
en_BA = BAM 1.205,34
to = ¤ 1,205.34
en_MG = Ar1,205
ewo_CM = 1 205 FCFA
ar_MR = ١٢٠٥ أ.م.‏
nl_AW = Afl. 1.205,34
en_IN = ₹ 1,205.34
mgo = ¤ 1,205.34
sn_ZW = US$1,205.34
en_CH = CHF 1'205.34
en_TT = $1,205.34
tr = 1.205,34 ¤
is = ¤1.205,34
fr_GP = 1 205,34 €
luy = ¤1,205.34
es_NI = C$1,205.34
pt_TL = 1 205,34 US$
it = ¤ 1.205,34
ms-Arab = ¤1,205.34
da = 1.205,34 ¤
kln_KE = Ksh1,205.34
iu = ¤ 1,205.34
tk = 1 205,34¤
en_BB = $1,205.34
ar_DZ = د.ج.‏ 1.205,34
ar_SY = ١٢٠٥ ل.س.‏
ha = ¤ 1,205.34
en_MH = $1,205.34
mr_IN = ₹१,२०५.३४
en_GB = £1,205.34
de = 1.205,34 ¤
fr_GQ = 1 205 FCFA
en_NO = NOK 1 205,34
ky_KG = сом 1 205,34
pt_PT = 1 205,34 €
fr_RW = 1 205 RF
nus_SD = SDG1,205.34
asa = 1,205.34 ¤
zh = ¤1,205.34
ha_GH = GH₵ 1,205.34
bo_CN = ¥ 1,205.34
kam_KE = Ksh1,205.34
dua_CM = 1 205 FCFA
khq_ML = 1 205CFA
ur_IN = ₹ ۱,۲۰۵.۳۴
en_LC = EC$1,205.34
fr_TD = 1 205 FCFA
ksb_TZ = 1,205TSh
gu_IN = ₹1,205.34
om = ¤1,205.34
jmc = ¤1,205.34
ro_RO = 1.205,34 RON
ja_JP = ¥1,205
ln_AO = 1.205,34 Kz
so_ET = Br1,205.34
en_GD = EC$1,205.34
nl_NL = € 1.205,34
es_ES = 1.205,34 €
en_VC = EC$1,205.34
or = ¤ 1,205.34
yo_NG = ₦1,205.34
es_PY = ₲ 1.205
mua_CM = FCFA1.205
fa_AF = ‎؋۱٬۲۰۵
en_HK = $1,205.34
ja = ¤1,205.34
luo_KE = 1,205.34Ksh
twq = 1 205.34¤
en_BE = 1.205,34 €
es_UY = $ 1.205,34
dje_NE = 1 205CFA
luy_KE = Ksh1,205.34
naq = ¤1,205.34
si_LK = රු. 1,205.34
zu = ¤1,205.34
zh-Hans_MO = MOP$1,205.34
fr_KM = 1 205 CF
zh_HK = $1,205.34
dz = ¤༡,༢༠༥.༣༤
swc = ¤1.205,34
asa_TZ = 1,205 TSh
jgo_CM = FCFA 1.205
az-Cyrl = ¤ 1.205,34
ewo = 1 205,34 ¤
gv_GB = £1,205.34
ti_ER = Nfk1,205.34
be_BY = р.1 205
en_IS = ISK1.205
en_CM = FCFA1,205
uk = 1 205,34 ¤
cgg_UG = USh1,205
nyn = ¤1,205.34
tr_CY = 1.205,34 €
de_CH = CHF 1'205.34
fr_TG = 1 205 CFA
jmc_TZ = TSh1,205
ta_LK = Rs. 1,205.34
so_SO = S1,205
es_DO = $1,205.34
fr_LU = 1.205,34 €
shi_MA = 1 205,34MAD
en_SS = £1,205.34
swc_CD = FC1.205,34
kn_IN = ₹1,205.34
hy_AM = 1205 դր.
en_IT = € 1.205,34
en_GG = £1,205.34
fil = ¤1,205.34
bas_CM = 1 205 FCFA
en_TZ = TSh1,205
ar_TD = ١٢٠٥ FCFA
ur = ¤1,205.34
bez_TZ = 1,205TSh
haw_US = $1,205.34
fr_VU = 1 205 VT
tg = ¤ 1,205.34
pa = ¤ 1,205.34
bs_BA = KM 1.205,34
ee_TG = CFA1,205
ti_ET = Br1,205.34
sr-Latn_BA = 1.205,34 KM
en_GH = GH₵1,205.34
ee = ¤1,205.34
en_VG = $1,205.34
sv_SE = 1 205:34 kr
ki_KE = Ksh1,205.34
zh-Hans = ¤1,205.34
bem = ¤1,205.34
uz = ¤ 1,205.34
ar_YE = ١٢٠٥ ر.ي.‏
fr_NC = 1 205 FCFP
seh_MZ = 1.205,34MTn
ru_UA = 1 205,34 ₴
fr_SC = 1 205,34 SR
ar_KM = ١٢٠٥ ف.ج.ق.‏
en_ZA = R1 205,34
en_GI = £1,205.34
mas_KE = Ksh1,205.34
nn_NO = 1 205,34 kr
ar_EG = ١٢٠٥٫٣٤ ج.م.‏
el = 1.205,34 ¤
en_RO = 1.205,34 RON
pl = 1 205,34 ¤
nl_BE = 1.205,34 €
en = ¤1,205.34
uz-Latn = ¤ 1,205.34
eo = ¤ 1 205,34
shi = 1 205,34¤
kok = ¤ 1,205.34
mas = ¤1,205.34
fr_FR = 1 205,34 €
rof = ¤1,205.34
en_MP = $1,205.34
de_BE = 1.205,34 €
hr_BA = 1.205,34 KM
ar_EH = د.م.‏ 1,205.34
es_CL = $1.205
en_AD = €1.205,34
es = 1.205,34 ¤
en_VI = $1,205.34
ps = ۱٬۲۰۵٫۳۴ ¤
et = 1 205,34 ¤
nl_SR = $ 1.205,34
vai-Latn = ¤1,205.34
pt = ¤1.205,34
eu = 1.205,34 ¤
ka = 1 205,34 ¤
fr_NE = 1 205 CFA
eu_ES = 1.205,34 €
mgh_MZ = MTn 1.205,34
zu_ZA = R1,205.34
ar_SA = ١٢٠٥٫٣٤ ر.س.‏
chr_US = $1,205.34
cgg = ¤1,205.34
sq_MK = den1 205,34
lag = ¤ 1,205.34
az_AZ = man. 1.205,34
es_VE = Bs.1.205,34
ks-Arab = ¤ ۱٬۲۰۵٫۳۴
en_HR = 1.205,34 HRK
el_GR = 1.205,34 €
el_CY = €1.205,34
mfe_MU = Rs 1 205
ki = ¤1,205.34
vi = 1.205,34 ¤
en_KE = Ksh1,205.34
rwk = 1,205.34¤
bez = 1,205.34¤
kk = 1 205,34 ¤
kl = ¤1.205,34
zh-Hant = ¤1,205.34
fr_CA = 1 205,34 $
km = ¤1.205,34
es_HN = L1,205.34
agq_CM = 1 205FCFA
kn = ¤1,205.34
ii_CN = ¥ 1,205.34
mn = ¤ 1 205,34
en_BM = $1,205.34
ko = ¤1,205.34
sv_AX = 1 205:34 €
ln_CD = 1.205,34 FC
en_GM = D1,205.34
iu-Cans = ¤ 1,205.34
fr_MA = 1 205,34 MAD
es_CO = $1.205
en_AG = EC$1,205.34
guz_KE = Ksh1,205.34
ks = ¤ ۱٬۲۰۵٫۳۴
es_PA = B/.1,205.34
twq_NE = 1 205CFA
en_NZ = $1,205.34
fr_TN = 1 205,340 DT
fa = ‎¤۱٬۲۰۵٫۳۴
en_US_POSI = $ 1205.34
dav_KE = Ksh1,205.34
en_WS = WS$1,205.34
lt_LT = 1 205,34 Lt
en_SZ = E1,205.34
ar_SD = ١٢٠٥٫٣٤ SDG
rof_TZ = TSh1,205
uz-Arab_AF = ؋ ۱٬۲۰۵
vi_VN = 1.205 ₫
en_MT = €1,205.34
kw = ¤1,205.34
yav_CM = 1 205 FCFA
ta_MY = RM 1,205.34
ru_KG = 1 205,34 сом
kab = 1 205,34¤
ky = ¤ 1 205,34
ff = 1 205,34 ¤
en_PG = K1,205.34
to_TO = T$ 1,205.34
ar_LY = د.ل.‏ 1.205,340
jgo = ¤ 1.205,34
en_HU = 1 205 HUF
af_ZA = R1 205,34
en_UG = USh1,205
de_LI = CHF 1'205.34
fi = 1 205,34 ¤
es_SV = US$1,205.34
khq = 1 205.34¤
gsw = 1’205.34 ¤
ksf_CM = 1 205 FCFA
fr_DJ = 1 205 Fdj
en_MU = Rs1,205
bs = ¤ 1.205,34
ln_CF = 1.205 FCFA
ms = ¤1,205.34
kea_CV = 1,205$34 CVE
pl_PL = 1 205,34 zł
pa-Arab = ¤ ۱٬۲۰۵٫۳۴
fr_MC = 1 205,34 €
sr_BA = 1.205,34 КМ
sr-Latn = 1.205,34 ¤
en_RU = 1 205,34 RUB
en_PH = ₱1,205.34
saq = ¤1,205.34
ar_PS = ١٢٠٥٫٣٤ ₪
fr_CD = 1 205,34 FC
bem_ZM = KR1,205.34
ru_RU = 1 205,34 руб.
uz = ¤ 1,205.34
pa = ¤ 1,205.34
vai = ¤1,205.34
en_FI = 1 205,34 €
fo = ¤1.205,34
so_KE = Ksh1,205.34
ln_CG = 1.205 FCFA
ar_OM = ١٢٠٥٫٣٤٠ ر.ع.‏
pt_ST = 1 205 Db
en_KI = $1,205.34
kl_GL = kr1.205,34
fr = 1 205,34 ¤
es_CR = ₡1.205
ses_ML = 1 205CFA
tzm = 1 205,34 ¤
mer_KE = Ksh1,205.34
xog = 1,205.34 ¤
xog_UG = 1,205 USh
nl_SX = NAf. 1.205,34
en_FJ = $1,205.34
ms_BN = $ 1.205,34
en_MW = MK1,205.34
ar_MA = د.م.‏ 1.205,34
pt_MO = 1 205,34 MOP$
kam = ¤1,205.34
en_TC = $1,205.34
af = ¤1 205,34
ar_TN = د.ت.‏1205,340
am_ET = ብር1,205.34
es_PE = S/.1,205.34
sbp_TZ = 1,205TSh
fr_CF = 1 205 FCFA
vun_TZ = TSh1,205
fr_RE = 1 205,34 €
ar_JO = ١٢٠٥٫٣٤٠ د.أ.‏
ebu = ¤1,205.34
lg = 1,205.34¤
ha_NG = ₦ 1,205.34
lv_LV = Ls1 205,34
ak = ¤1,205.34
chr = ¤1,205.34
az-Cyrl_AZ = ман. 1.205,34
dav = ¤1,205.34
en_EE = 1 205,34 €
es_419 = ¤1,205.34
ebu_KE = Ksh1,205.34
en_CY = 1.205,34 €
fr_MF = 1 205,34 €
en_AL = ALL1 205
am = ¤1,205.34
en_PK = Rs1,205
mgo_CM = FCFA 1,205
fr_CG = 1 205 FCFA
dje = 1 205.34¤
en_JE = £1,205.34
en_LR = $1,205.34
dyo = 1 205,34 ¤
ln = 1.205,34 ¤
ak_GH = GH₵1,205.34
pa_IN = ₹ 1,205.34
ar_DJ = ١٢٠٥ Fdj
en_BS = $1,205.34
lo = ¤1.205,34
zh_TW = NT$1,205.34
lg_UG = 1,205USh
ar_KW = ١٢٠٥٫٣٤٠ د.ك.‏
ar = ١٢٠٥٫٣٤ ¤
bs-Cyrl_BA = 1.205,34 КМ
es_EA = 1.205,34 €
fr_MG = 1 205 Ar
ca_ES = €1.205,34
as = ¤ ১,২০৫.৩৪
he_IL = 1,205.34 ₪
es_CU = $1,205.34
en_CZ = 1 205,34 CZK
en_PL = 1 205,34 PLN
fr_GA = 1 205 FCFA
mg_MG = Ar1,205
fr_CH = CHF 1'205.34
en_LS = R1,205.34
lt = 1 205,34 ¤
my_MM = K ၁,၂၀၅
kk_KZ = 1 205,34 ₸
ga = ¤1,205.34
en_FM = $1,205.34
lu = 1.205,34¤
ps_AF = ۱٬۲۰۵ ؋
nmg = 1 205,34 ¤
es_BO = Bs1.205,34
sbp = 1,205.34¤
lv = ¤1 205,34
vun = ¤1,205.34
fr_YT = 1 205,34 €
km_KH = ៛1.205,34
teo_UG = USh1,205
fr_SN = 1 205 CFA
om_ET = Br1,205.34
ar_ER = ١٢٠٥٫٣٤ Nfk
gsw_CH = 1’205.34 CHF
az = ¤ 1.205,34
es_PH = 1.205,34 ₱
fi_FI = 1 205,34 €
tr_TR = 1.205,34 ₺
fr_CI = 1 205 CFA
en_LT = 1 205,34 LTL
en_UM = $1,205.34
sr = 1.205,34 ¤
ur_PK = Rs1,205
hr_HR = 1.205,34 kn
nl_CW = NAf. 1.205,34
en_KN = EC$1,205.34
ms_MY = RM1,205.34
ar_IL = ١٢٠٥٫٣٤ ₪
en_ZM = KR1,205.34
es_EC = $1.205,34
gl_ES = €1.205,34
en_GU = $1,205.34
gl = ¤1.205,34
nmg_CM = 1 205 FCFA
zh_MO = MOP$1,205.34
en_NA = $1,205.34
ha_NE = CFA 1,205
mt_MT = €1,205.34
rm = 1’205.34 ¤
kw_GB = £1,205.34
zh_SG = $1,205.34
rn = 1.205,34¤
ro = 1.205,34 ¤
rm_CH = 1’205.34 CHF
saq_KE = Ksh1,205.34
vai_LR = $1,205.34
ka_GE = 1 205,34 GEL
es_GQ = FCFA1.205
sr-Latn_RS = 1.205 din.
en_VU = VT1,205
zh-Hans_HK = $1,205.34
en_LV = LVL1 205,34
agq = 1 205,34¤
gu = ¤1,205.34
lo_LA = ₭1.205
ru = 1 205,34 ¤
en_SB = $1,205.34
gv = ¤1,205.34
en_BW = P1,205.34
yav = 1 205,34 ¤
ta_SG = $ 1,205.34
fr_BE = 1.205,34 €
bg_BG = 1 205,34 лв.
es_MX = $1,205.34
rw = ¤ 1.205,34
be = ¤1 205,34
nd_ZW = US$1,205.34
kab_DZ = 1 205,34DA
mua = ¤1.205,34
pt_CV = 1 205$34 CVE
bg = 1 205,34 ¤
tg_TJ = сом 1,205.34
ms_SG = $1,205.34
mg = ¤1,205.34
sg_CF = FCFA1.205
pa-Arab_PK = ر ۱٬۲۰۵
sw_TZ = TSh1,205
en_SC = SR1,205.34
nus = ¤1,205.34
shi-Tfng = 1 205,34¤
ar_QA = ١٢٠٥٫٣٤ ر.ق.‏
naq_NA = $1,205.34
fr_BF = 1 205 CFA
rw_RW = RF 1.205
as_IN = ₹ ১,২০৫.৩৪
guz = ¤1,205.34
ksb = 1,205.34¤
fr_ML = 1 205 CFA
mk = ¤ 1.205,34
kok_IN = ₹ 1,205.34
sq_AL = Lek1 205
ml = 1,205.34¤
fr_GF = 1 205,34 €
bm = ¤1,205.34
lu_CD = 1.205,34FC
fr_CM = 1 205 FCFA
bn = ১,২০৫.৩৪¤
ar_LB = ١٢٠٥ ل.ل.‏
id_ID = Rp1.205
uz-Arab = ¤ ۱٬۲۰۵٫۳۴
mn = ¤ 1 205,34
bo = ¤ 1,205.34
en_FR = 1 205,34 €
en_DE = 1.205,34 €
vai-Latn_L = $1,205.34
ar_SO = ١٢٠٥ S
ru_BY = 1 205 р.
//
// PrintLocalesController.m
// NSFormatterTest
//
// Created by Maciek Grzybowski on 02.04.2014.
//
#import "PrintLocalesController.h"
@interface PrintLocalesController ()
@end
@implementation PrintLocalesController
- (void)viewDidLoad {
[super viewDidLoad];
NSNumber *price = @(1205.34);
NSArray *locales = [NSLocale availableLocaleIdentifiers];
NSMutableString *log = [NSMutableString string];
[log appendString:@"\n"];
for (NSString *localeID in locales) {
[log appendString:[self stringWithPrice:price withLocale:[NSLocale localeWithLocaleIdentifier:localeID]]];
[log appendString:@"\n"];
}
NSLog(@"%@", log);
}
-(NSString*)stringWithPrice:(NSNumber*)price withLocale:(NSLocale*)locale {
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
[formatter setLocale: locale];
[formatter setNumberStyle:NSNumberFormatterCurrencyStyle];
NSString *localeID = [[locale objectForKey:NSLocaleIdentifier] stringByPaddingToLength:10 withString:@" " startingAtIndex:0];
NSString *priceString = [[formatter stringFromNumber:price] stringByPaddingToLength:10 withString:@" " startingAtIndex:0];
NSString *currencyCode = [[locale objectForKey:NSLocaleCurrencySymbol] stringByPaddingToLength:10 withString:@" " startingAtIndex:0];
return [NSString stringWithFormat:@"%@ = %@, currenyCode = %@", localeID, priceString, currencyCode];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment