src/Sasedev/ExtraToolsBundle/Twig/TwigExtension.php
public function countryFilter($country, $default = '', $locale = null)
	{
		$locale = $locale == null ? \Locale::getDefault() : $locale;
		$countries = Intl::getRegionBundle()->getCountryNames($locale);

		return array_key_exists($country, $countries) ? $countries[$country] : $default;
	}
public function countryFilter($country, $default = '', $locale = null)
	{
		$locale = $locale == null ? \Locale::getDefault() : $locale;
		$countries = Intl::getRegionBundle()->getCountryNames($locale);

		return array_key_exists($country, $countries) ? $countries[$country] : $default;
	}
public function countryFilter ( $ country , $ default = '' , $ locale = null ) { $ locale = $ locale == null ? \ Locale :: getDefault ( ) : $ locale ; $ countries = Intl :: getRegionBundle ( ) -> getCountryNames ( $ locale ) ; return array_key_exists ( $ country , $ countries ) ? $ countries [ $ country ] : $ default ; }
Translate a country indicator to its locale full name
Uses default system locale by default.
Pass another locale string to force a different translation

@param string $country
The contry indicator
@param string $default
The default value is the country does not exist (optionnal)
@param mixed $locale
@return string The localized string
Translate a country indicator to its locale full name Uses default system locale by default . Pass another locale string to force a different translation