Documentation

Ucommerce includes full API reference documentation and lots of helpful articles to help you build your e-commerce site as effortlessly as possible.

Topics Payment Providers
v7.18

Formatting

Format Currency

The TransactionLibrary features a way of formatting a string or decimal, to a standard currency representation, using the current localization context.

Usage

    var transactionLibrary = ObjectFactory.Instance.Resolve<ITransactionLibrary>();
    
    var formattedPrice = transactionLibrary.FormatCurrency(1337m, "da-DK");
    
    

Example result

133,7

Parameters

Parameter Type Details
amount string / decimal The money amount to be formatted
cultureCode string The culture code used in the formatting