Skip to content

Commit

Permalink
Get default locale before setting a new locale
Browse files Browse the repository at this point in the history
This should fix #11199
  • Loading branch information
liviakuenzli committed Sep 15, 2017
1 parent 639a1c7 commit 6e54d27
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/I18n/I18n.php
Expand Up @@ -289,6 +289,7 @@ public static function locale($locale = null)
*/
public static function setLocale($locale)
{
static::getDefaultLocale();
Locale::setDefault($locale);
if (isset(static::$_collection)) {
static::translators()->setLocale($locale);
Expand Down

0 comments on commit 6e54d27

Please sign in to comment.