/**
* Get the language locale based on current language.
*
* @return array The locale according to the language.
*
* @since 1.7.0
*/
public function getLocale()
{
if (!isset($this->locale)) {
$locale = str_replace(' ', '', $this->metadata['locale'] ?? '');
if ($locale) {
$this->locale = explode(',', $locale);
} else {
$this->locale = false;
}
}
return $this->locale;
}