Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Translation of their own fields

Go to End



Community Member, 7 Posts

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 {



Attached Files