$locale = 'en_US'; $currencySymbol = Locale::getDefaultCurrencySymbol($locale); echo $currencySymbol; // Output: $
$locale = 'de_DE'; $currencySymbol = Locale::getDefaultCurrencySymbol($locale); echo $currencySymbol; // Output: €This function is part of the PHP Intl extension, which provides a set of functions and classes for internationalization and localization. The package library is called intl.