fix: Fall back to english only if intl is missing.
This commit is contained in:
parent
153bb0e91d
commit
a3c75b2dd4
1 changed files with 5 additions and 0 deletions
|
@ -17,6 +17,11 @@ class SettingsSeeder extends Seeder
|
||||||
*/
|
*/
|
||||||
public static function getSupportedLanguageMap()
|
public static function getSupportedLanguageMap()
|
||||||
{
|
{
|
||||||
|
if (! class_exists('Locale')) {
|
||||||
|
Log::info('PHP Extension Intl not found. Falling back to English language support only.');
|
||||||
|
return json_encode(['en' => 'English']);
|
||||||
|
}
|
||||||
|
|
||||||
$languageDirectories = array_filter(glob(resource_path().'/lang/*'), 'is_dir');
|
$languageDirectories = array_filter(glob(resource_path().'/lang/*'), 'is_dir');
|
||||||
$result = [];
|
$result = [];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue