[Contracts][Translation] Optional Intl dependency
This commit is contained in:
parent
50f37f0ccc
commit
d65d39da14
@ -35,7 +35,7 @@ trait TranslatorTrait
|
||||
*/
|
||||
public function getLocale()
|
||||
{
|
||||
return $this->locale ?: \Locale::getDefault();
|
||||
return $this->locale ?: (class_exists(\Locale::class) ? \Locale::getDefault() : 'en');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user