public getSupportedLocales ( ) : array | ||
리턴 | array |
public function getSupportedLocales()
{
if (!empty($this->supportedLocales)) {
return $this->supportedLocales;
}
$locales = $this->configRepository->get('laravellocalization.supportedLocales');
if (empty($locales) || !is_array($locales)) {
throw new SupportedLocalesNotDefined();
}
$this->supportedLocales = $locales;
return $locales;
}
/** * Return an array of all supported Locales * * @throws SupportedLocalesNotDefined * @return array * @static */ public static function getSupportedLocales() { return \Mcamara\LaravelLocalization\LaravelLocalization::getSupportedLocales(); }