Skip to content
This repository
Browse code

i18n for CMS section titles (see #7798)

  • Loading branch information...
commit 2fab657fcee6f697de428c4810960222e6eb7677 1 parent 3b59212
Ingo Schommer authored

Showing 1 changed file with 5 additions and 4 deletions. Show diff stats Hide diff stats

  1. 9  admin/code/LeftAndMain.php
9  admin/code/LeftAndMain.php
@@ -336,9 +336,8 @@ function init() {
336 336
 	}
337 337
 	
338 338
 	function handleRequest(SS_HTTPRequest $request, DataModel $model = null) {
339  
-		$title = $this->Title();
340  
-		
341 339
 		$response = parent::handleRequest($request, $model);
  340
+		$title = $this->Title();
342 341
 		if(!$response->getHeader('X-Controller')) $response->addHeader('X-Controller', $this->class);
343 342
 		if(!$response->getHeader('X-Title')) $response->addHeader('X-Title', $title);
344 343
 		
@@ -1342,8 +1341,10 @@ function Title() {
1342 1341
 	 * @return string
1343 1342
 	 */
1344 1343
 	function SectionTitle() {
1345  
-		if($title = $this->stat('menu_title')) return $title;
1346  
-		
  1344
+		$class = get_class($this);
  1345
+		$defaultTitle = LeftAndMain::menu_title_for_class($class);
  1346
+		if($title = _t("{$class}.MENUTITLE", $defaultTitle)) return $title;
  1347
+
1347 1348
 		foreach($this->MainMenu() as $menuItem) {
1348 1349
 			if($menuItem->LinkingMode != 'link') return $menuItem->Title;
1349 1350
 		}

0 notes on commit 2fab657

Please sign in to comment.
Something went wrong with that request. Please try again.