Skip to content
Permalink
Browse files

default the env locale to en_US

otherwise it can lead to some out of sync problems whereby this
method returns "" and defaultLocale returns "en_US" making direct
comparison of "is the locale the env default" not possible
  • Loading branch information...
AD7six committed Sep 19, 2014
1 parent 837e23a commit 8df31b01240772d6e3810da60e428d20873397c3
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/I18n/I18n.php
@@ -229,7 +229,7 @@ public static function defaultLocale($locale = null) {
*/
public static function environmentLocale() {
if (static::$_environmentLocale === null) {
static::$_environmentLocale = Locale::getDefault();
static::$_environmentLocale = Locale::getDefault() ?: 'en_US';
}
return static::$_environmentLocale;
}

0 comments on commit 8df31b0

Please sign in to comment.
You can’t perform that action at this time.