Log in
Model

Country

Magento\Directory\Model\Country

What it does

This model class represents a country in Magento 2's directory system.

Developers use it to load country data by code, retrieve associated regions/states, format addresses according to country-specific templates, and get localized country names.

It's commonly used in checkout, customer address management, and anywhere country/region information is needed.

Public Methods

  • loadByCode()
  • getRegions()
  • getLoadedRegionCollection()
  • getRegionCollection()
  • formatAddress()
  • getFormats()
  • _resetState()
  • getFormat()
  • getName()