BUGFIX Moved creation of "help" menu entry from cms/_config.php to LeftAndMain::init() to get localized titles (locale isn't set at _config.php level)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@68177 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-12-10 09:07:46 +00:00 committed by Sam Minnee
parent c09aed0fda
commit f461b91eba
2 changed files with 7 additions and 7 deletions

View File

@ -19,11 +19,4 @@ Director::addRules(50, array(
));
CMSMenu::populate_menu();
CMSMenu::add_link(
'Help',
_t('LeftAndMain.HELP', 'Help', PR_HIGH, 'Menu title'),
'http://userhelp.silverstripe.com'
);
?>

View File

@ -77,6 +77,13 @@ class LeftAndMain extends Controller {
i18n::set_locale($member->Locale);
}
// can't be done in cms/_config.php as locale is not set yet
CMSMenu::add_link(
'Help',
_t('LeftAndMain.HELP', 'Help', PR_HIGH, 'Menu title'),
'http://userhelp.silverstripe.com'
);
// set reading lang
if(Translatable::is_enabled() && !Director::is_ajax()) {
Translatable::choose_site_lang(array_keys(i18n::get_existing_content_languages('SiteTree')));