diff --git a/code/Subsite.php b/code/Subsite.php index aa164d5..c8a4f2a 100644 --- a/code/Subsite.php +++ b/code/Subsite.php @@ -46,7 +46,7 @@ class Subsite extends DataObject implements PermissionProvider { ); static $defaults = array( - 'IsPublic' => 1, + 'IsPublic' => 1 ); static $searchable_fields = array( @@ -103,6 +103,14 @@ class Subsite extends DataObject implements PermissionProvider { } } + public function getLanguage() { + if($this->getField('Language')) { + return $this->getField('Language'); + } else { + return i18n::get_locale(); + } + } + /** * Whenever a Subsite is written, rewrite the hostmap *