mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Reduce calls to i18n.default_config
This commit is contained in:
parent
179a9fca28
commit
598a2c91e3
@ -350,7 +350,10 @@ class i18n implements TemplateGlobalProvider
|
||||
*/
|
||||
public static function get_locale()
|
||||
{
|
||||
return self::$current_locale ?: i18n::config()->uninherited('default_locale');
|
||||
if (!self::$current_locale) {
|
||||
self::$current_locale = i18n::config()->uninherited('default_locale');
|
||||
}
|
||||
return self::$current_locale;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user