From 0e3b4bfc885007530d9f1af501f8442da0c57b8d Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 14 May 2009 05:19:48 +0000 Subject: [PATCH] MINOR Merged from trunk git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@76843 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/CMSMain.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/code/CMSMain.php b/code/CMSMain.php index 21954a2d..b953a6dd 100644 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -1190,19 +1190,7 @@ JS; function LangSelector() { $member = Member::currentUser(); //check to see if the current user can switch langs or not if(Permission::checkMember($member, 'VIEW_LANGS')) { - $allKey = _t('Form.LANGAOTHER', "Other languages"); - $all = i18n::get_common_locales(); //all languages - $used = Translatable::get_existing_content_languages(); //languages currently in use - if( $used && count($used) ) { - foreach($used as $index => $code) { - if(!$code) continue; - $available[$index] = $all[$index]; - unset($all[$index]); - } - $langs[ _t('Form.LANGAVAIL', "Available languages") ] = (isset( $available )) ? $available : array(); - } - $langs[ _t('Form.LANGAOTHER', "Other languages") ] = $all; - return new GroupedDropdownField('LangSelector', 'Language', $langs, Translatable::current_locale()); + return new LanguageDropdownField('LangSelector', 'Language', array(), 'SiteTree', 'Locale-English'); } //user doesn't have permission to switch langs so just show a string displaying current language