Download xirelogy / magpie-core / CommonNormalizeLocale.php - Solve class 'CommonNormalizeLocale' not found

This file is part of the package xirelogy/magpie-core. Please go to our download page to download this composer package and to solve the problem class 'CommonNormalizeLocale' not found.
Download xirelogy/magpie-core
Class is not correct? Search class


<?php namespace Magpie\Locales\Traits; /** * May normalize locale */ trait CommonNormalizeLocale { /** * Normalize the locale string * @param string $locale * @return string */ protected static final function normalizeLocale(string $locale) : string { $locale = str_replace('-', '_', strtolower($locale)); $ret = []; foreach (explode(',', $locale) as $subLocale) { $ret[] = trim($subLocale); } return implode(',', $ret); } }