Skip to content

Commit

Permalink
FIX Update i18n::validate_locale for SS4
Browse files Browse the repository at this point in the history
  • Loading branch information
robbieaverill committed Sep 1, 2017
1 parent 314f218 commit 793b46e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/extensions/SiteTreeSubsites.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
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;
Expand Down Expand Up @@ -341,7 +342,7 @@ public static function contentcontrollerInit($controller)
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);
}
}
Expand Down

0 comments on commit 793b46e

Please sign in to comment.