Basic Usage


We’re sorry but this documentation section is outdated. Please have that in mind when trying to use it. You can help us making documentation up to date via Sylius Github. Thank you!

Getting a Currency name


use Sylius\Component\Currency\Model\Currency;

$currency = new Currency();

$currency->getName(); // Returns 'US Dollar'.

The getName method uses Symfony’s Intl class to convert currency’s code into a human friendly form.


The output of getName may vary as the name is generated accordingly to the set locale.


The CurrencyConverter allows you to convert a value accordingly to the exchange rate of specified currency.

This behaviour is used just for displaying the approximate value in another currency than the base currency of the channel.


This service implements the CurrencyConverterInterface.


The CurrencyProvider allows you to get all available currencies.


use Sylius\Component\Currency\Provider\CurrencyProvider;
use Sylius\Component\Resource\Repository\InMemoryRepository;

$currencyRepository = new InMemoryRepository();
$currencyProvider = new CurrencyProvider($currencyRepository);

$currencyProvider->getAvailableCurrencies(); // Returns an array of Currency objects.

The getAvailableCurrencies method retrieves all currencies which enabled property is set to true and have been inserted in the given repository.


This service implements the CurrencyProviderInterface.