From 8362026b12cf75ac398e2e849bbfbb5d8a34bfb3 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 14 May 2009 21:27:10 +0000 Subject: [PATCH] BUGFIX Fixed CMSMain->LangSelector() default language selection git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@76870 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/CMSMain.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/CMSMain.php b/code/CMSMain.php index ff36da37..5f3ea74f 100644 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -1250,7 +1250,15 @@ JS; function LangSelector() { $member = Member::currentUser(); //check to see if the current user can switch langs or not if(Permission::checkMember($member, 'VIEW_LANGS')) { - return new LanguageDropdownField('LangSelector', 'Language', array(), 'SiteTree', 'Locale-English'); + $dropdown = new LanguageDropdownField( + 'LangSelector', + 'Language', + array(), + 'SiteTree', + 'Locale-English' + ); + $dropdown->setValue(Translatable::get_current_locale()); + return $dropdown; } //user doesn't have permission to switch langs so just show a string displaying current language