mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR Moved Translatable::choose_site_locale() from LeftAndMain to CMSMain, its not necessary in other core controllers (other than specifically customized ModelAdmin instances)
This commit is contained in:
parent
466add9bb2
commit
7d9904d1f1
@ -77,6 +77,11 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
}
|
||||
|
||||
public function init() {
|
||||
// set reading lang
|
||||
if(Object::has_extension('SiteTree', 'Translatable') && !$this->isAjax()) {
|
||||
Translatable::choose_site_locale(array_keys(Translatable::get_existing_content_languages('SiteTree')));
|
||||
}
|
||||
|
||||
parent::init();
|
||||
|
||||
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.js');
|
||||
|
Loading…
Reference in New Issue
Block a user