Search Unity

[Solved] Getting currency symbol?

Discussion in 'Unity IAP' started by andymads, Sep 14, 2017.

Thread Status:
Not open for further replies.
  1. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    Your docs seems to suggest there should be a field in the metadata named iosCurrencySymbol but it doesn't seem to exist?

    I realise that for many localisations the currency symbol will be a single character at the start of localizedPriceString and I could easily extract that but I don't know if that holds for all localisations and I'd like a solution that works for them all.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I'm not seeing that field described in the docs? Perhaps you are referring to isoCurrencyCode ?
     
  3. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Got it! I will check to see if/how we expose that value. In the meantime, you might be able to obtain it from System.Globalization.RegionInfo

    http://ninja-code.co.uk/how-to-return-currency-symbol-from-currency-code-using-c/

    May I ask what problem you are trying to solve? Within Unity IAP, you generally should not need to be concerned about the separator (once an upcoming version is released, which addresses some known issues).
     
    Last edited: Sep 14, 2017
  5. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    I'm just trying to work out if I can convert my IAP wrapper code from using multiple plugins, e.g. Prime31, Google,etc to using Unity IAP only.

    Currently I store the symbol along with the other fields but I doubt I actually use it anywhere so it's probably not important.
     
Thread Status:
Not open for further replies.