Registering a Currency
Last updated
Was this helpful?
Last updated
Was this helpful?
Money2 ships with a list of however there are times when you may want to add additional currencies (e.g. digital currencies) or change the defaults for an existing Common Currency.
Common Currencies are pre-loaded into the currency Registry in Money2. You can not modify a Common Currency but you can replace it's entry in the Money2 registry.
This means that when parsing a string containing an isoCode or using Currencies().find the modified Currency will be returned.
When creating custom Currencies you have two choices, register the currency , with the benefit that you can access it like any other currency, or create and manage the currency in your own code.
Both methods are useful at different times so use the one that best suits your use case.