public function DefaultLocaleResolver::__construct in Commerce Core 8.2
Constructs a new DefaultLocaleResolver object.
Parameters
\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.
\Drupal\commerce\CurrentCountryInterface $current_country: The current country.
File
- src/
Resolver/ DefaultLocaleResolver.php, line 36
Class
- DefaultLocaleResolver
- Returns the locale based on the current language and country.
Namespace
Drupal\commerce\ResolverCode
public function __construct(LanguageManagerInterface $language_manager, CurrentCountryInterface $current_country) {
$this->languageManager = $language_manager;
$this->currentCountry = $current_country;
}