8000 [Contracts][Translation] Optional Intl dependency · symfony/symfony@d65d39d · GitHub
[go: up one dir, main page]

Skip to content

Commit d65d39d

Browse files
authored
[Contracts][Translation] Optional Intl dependency
1 parent 50f37f0 commit d65d39d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Contracts/Translation/TranslatorTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function setLocale($locale)
3535
*/
3636
public function getLocale()
3737
{
38-
return $this->locale ?: \Locale::getDefault();
38+
return $this->locale ?: (class_exists(\Locale::class) ? \Locale::getDefault() : 'en');
3939
}
4040

4141
/**

0 commit comments

Comments
 (0)
0