/** * Get locale with specified language (de), country (DE) or locale (de_DE). * * @param $string * * @return Locale|null * */ public function find($string) { if (strlen($string) == 2) { if (Text::isUpper($string)) { return $this->findByCountry($string); } return $this->findByLanguage($string); } return $this->findByLocale($string); }