Log in
Model

Locale

Magento\Config\Model\Config\Source\Locale

What it does

This class provides a list of available locales (languages/regions) for Magento 2 configuration dropdowns in the admin panel.

Developers use this as a source model in system.xml files when they need to display a locale selection field, such as for store language or regional settings configuration options.

Public Methods

  • toOptionArray()