5095 Posts in 1518 Topics by 1114 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 824 Views |
-
Translation of their own fields

18 April 2009 at 2:12am
I created its type of the page:
/**
* Defines the NewsPage page type
*/
class NewsPage extends Page {static $db = array(
'Date' => 'Date',
);static $has_one = array(
'Photo' => 'Image',
);As I can translate into russian language in Admin Panel this Fields: Date and Photo
static $icon = "/themes/tutorial/images/treeicons/news";
function getCMSFields() {
$fields = parent::getCMSFields();$fields->addFieldToTab('Root.Content.Main', new CalendarDateField('Date'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new ImageField('Photo'), 'Content');
return $fields;
function fieldLabels() {
$labels = parent::fieldLabels();
$labels['Date'] = _t('NewsPage.DATE', "Val News Date");
return $labels;
}
}}
class NewsPage_Controller extends Page_Controller {
}
?>
| 824 Views | ||
|
Page:
1
|
Go to Top |

