From 478ca90c3135d9fdff4b6e74725b7b2c734a8e67 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 4 Sep 2015 22:19:28 +0930 Subject: [PATCH] Fallback to English if system-wide default_locale doesn't exist --- src/Support/ClientAction.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Support/ClientAction.php b/src/Support/ClientAction.php index 40f110ea8..1a3f44340 100644 --- a/src/Support/ClientAction.php +++ b/src/Support/ClientAction.php @@ -248,7 +248,11 @@ abstract class ClientAction extends HtmlAction } if (! $locale || ! $this->locales->hasLocale($locale)) { - return $this->settings->get('default_locale', 'en'); + $locale = $this->settings->get('default_locale', 'en'); + } + + if (! $this->locales->hasLocale($locale)) { + return 'en'; } return $locale;