[Translation] Fixed fallback location if location is longer than three characters (possibly by mistake).
This commit is contained in:
parent
b86e6db035
commit
2434552aa9
@ -172,7 +172,7 @@ class Translator implements TranslatorInterface
|
||||
|
||||
protected function computeFallbackLocale($locale)
|
||||
{
|
||||
if (strlen($locale) > 3) {
|
||||
if (strrchr($locale, '_') !== false) {
|
||||
return substr($locale, 0, -strlen(strrchr($locale, '_')));
|
||||
} else {
|
||||
return $this->fallbackLocale;
|
||||
|
Reference in New Issue
Block a user