Localize a currency for the in-app price tag
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Localize a currency for the in-app price tag
Hi guys,
How to localized in-app price tags depend of the countries? so how to find out a money currency setting used by the App Store?
For example, App should show US dollar to users registered in the US App Store, Japanese Yen to users registered in the Japanese App Store.
I checked both mobilePreferredLaguages, mobileCurrentLocale. They return language and country settings but they don’t mean anything about the money currency settings in the device. Even though it returns "US" or "JP" for country setting, the money currency can be anything depends on the App Store's country setting.
Any suggestions?
Thanks a million in advance,,
Louis
How to localized in-app price tags depend of the countries? so how to find out a money currency setting used by the App Store?
For example, App should show US dollar to users registered in the US App Store, Japanese Yen to users registered in the Japanese App Store.
I checked both mobilePreferredLaguages, mobileCurrentLocale. They return language and country settings but they don’t mean anything about the money currency settings in the device. Even though it returns "US" or "JP" for country setting, the money currency can be anything depends on the App Store's country setting.
Any suggestions?
Thanks a million in advance,,
Louis
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Localize a currency for the in-app price tag
All I can suggest is to "tie" currency to locale, so:
https://docs.oracle.com/cd/E13214_01/wl ... codes.html
Code: Select all
switch mobileCurrentLocale()
case "en_UK"
updateDisplay "english"
put "£" into CURRENCY
break
case "en_US"
update display "english"
put "$" into CURRENCY
break
case "yo_NG"
update display "yoruba"
put "Naira" into CURRENCY
break
end switch
end if
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Localize a currency for the in-app price tag
Sorry, instead of putting "Naira" into my sample code
I should have put "NGN":
https://www.iban.com/currency-codes
It might be better, and easier to handle if one were to use the numeric codes
for currencies.
So, for Nigeria one might use 566.
- -
Currently running at about 362 to the United States dollar.
I should have put "NGN":
https://www.iban.com/currency-codes
It might be better, and easier to handle if one were to use the numeric codes
for currencies.
So, for Nigeria one might use 566.
- -
Currently running at about 362 to the United States dollar.
Re: Localize a currency for the in-app price tag
Hi richmond62
mobileCurrentLocale() returns language and country settings but it does not provide the money currency setting in App Store. Even though it returns "en-US" for country setting, the money currency can be anything depends on the App Store's country setting.
Do you know how to find out the country setting of App Store?
mobileCurrentLocale() returns language and country settings but it does not provide the money currency setting in App Store. Even though it returns "en-US" for country setting, the money currency can be anything depends on the App Store's country setting.
Do you know how to find out the country setting of App Store?
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Localize a currency for the in-app price tag
I must be missing something as that sentence seems to imply that the currency isEven though it returns "en-US" for country setting, the money currency can be anything depends on the App Store's country setting.
directly linked to the country setting.
- -
I cannot find a way to change the language (to, say, Scots) independently
of the "country" setting [the UK is not a country].
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Localize a currency for the in-app price tag
The App Store handles currency conversions for you, and unless they provide an API to get that info I'm not sure you can retrieve it. I think once a user has purchased in-app, the response may provide the currency (I'm guessing) but that won't help if you want to display a cost before a purchase.
Do any other apps do this?
Do any other apps do this?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Localize a currency for the in-app price tag
All apps display a price pre-purchase:Do any other apps do this?
- -
Presumably the currency is determined by the country setting of the App-Store,
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Localize a currency for the in-app price tag
Right, but that's in the App Store itself. The question was how to query that currency from within the app and display it in the app without sending the user to the store to look it up.richmond62 wrote: ↑Wed Mar 13, 2019 5:39 pmAll apps display a price pre-purchase:Do any other apps do this?
-
Screenshot 2019-03-13 at 18.38.51.png
-
Presumably the currency is determined by the country setting of the App-Store,
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Localize a currency for the in-app price tag
I wish you had stated that as clearly as you did just now earlier on.The question was how to query that currency from within the app and display it in the app
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Localize a currency for the in-app price tag
Just go back to my code I offered above.
NO: it will not retrieve a state's currency, but it will retrieve the code for
the state the computer is domiciled in [and I mean "domiciled" rather than is physically present]
and then from a look-up list you can find the currency that is relevant.
NO: it will not retrieve a state's currency, but it will retrieve the code for
the state the computer is domiciled in [and I mean "domiciled" rather than is physically present]
and then from a look-up list you can find the currency that is relevant.
Re: Localize a currency for the in-app price tag
Here is my experiment with iPhone.
-Region setting: United States
-Country setting of the App Store ID(App Store): Japan <-- You can not find country setting of a user ID in the phone, You only able to choose a country when register the Apple ID.
With this settings,
1.mobileCurrentLocale() returns "en_US"
2.App Store shows Japanese yen ¥ as a default currency because country setting of App Store is Japan.
This scenario can happen when Japanese users travel to US. By using mobileCurrentLocale(), the currency of the price tag "in the app" (Not the store front) will be US dollar while the App Store's default currency is Japanese Yen. This will confuse users.
But is mobileCurrentLocale() still the best option?
I have implemented mobileCurrentLocale() but it will be great if anyone suggest a option..
Cheers,
-Region setting: United States
-Country setting of the App Store ID(App Store): Japan <-- You can not find country setting of a user ID in the phone, You only able to choose a country when register the Apple ID.
With this settings,
1.mobileCurrentLocale() returns "en_US"
2.App Store shows Japanese yen ¥ as a default currency because country setting of App Store is Japan.
This scenario can happen when Japanese users travel to US. By using mobileCurrentLocale(), the currency of the price tag "in the app" (Not the store front) will be US dollar while the App Store's default currency is Japanese Yen. This will confuse users.
But is mobileCurrentLocale() still the best option?
I have implemented mobileCurrentLocale() but it will be great if anyone suggest a option..
Cheers,