mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
FIX Update i18n::validate_locale for SS4
This commit is contained in:
parent
314f218306
commit
793b46ede3
@ -14,6 +14,7 @@ use SilverStripe\Forms\DropdownField;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\FormAction;
|
||||
use SilverStripe\Forms\ToggleCompositeField;
|
||||
use SilverStripe\i18n\i18n;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\ORM\DataQuery;
|
||||
@ -341,7 +342,7 @@ class SiteTreeSubsites extends DataExtension
|
||||
SSViewer::set_themes(array_merge([$subsite->Theme], SSViewer::get_themes()));
|
||||
}
|
||||
|
||||
if ($subsite && i18n::validate_locale($subsite->Language)) {
|
||||
if ($subsite && i18n::getData()->validate($subsite->Language)) {
|
||||
i18n::set_locale($subsite->Language);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user