Hi, I have notied some strange behaviour within Silverstripe 3.1
I created some kind of Translation for a Page the following way:
class Page extends SiteTree {
private static $db = array(
'Title_en' => "Varchar(255)",
'Content_en' => "HTMLText"
);
public function getTitle(){
if(i18n::get_locale() == 'de_DE'){
return $this->Title;
}else{
return $this->Title_en;
}
}
public function getContent(){
if(i18n::get_locale() == 'de_DE'){
return $this->Content;
}else{
return $this->Content_en;
}
}
}
This throws a Notice, as of "$this->Title" isn't known within getTitle(), but why?
Anyone any Ideas?