Magento2 – How to Get Country Name Using Country Code
![Magento2 – How to Get Country Name Using Country Code](https://knowthemage.com/wp-content/uploads/2017/03/how-to-get-country-name-using-country-code-803x490.webp)
![Magento2 – How to Get Country Name Using Country Code](https://knowthemage.com/wp-content/uploads/2017/03/how-to-get-country-name-using-country-code-803x490.webp)
Create Instance to Object Manager then inject dependency to perform your query:
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
Now load your country by the following code:
$country = $objectManager->create('\Magento\Directory\Model\Country')->load('AE')->getName();</pre>
While AE is the country code. The output of above code will be:
United Arab Emirates