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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

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

translate content from DataObjects (SS3.0.2)


Go to End


1274 Views

Avatar
dh

Community Member, 13 Posts

5 October 2012 at 9:01pm

Edited: 06/10/2012 3:56am

(SS3.0.2)
hi,
i can't use the _t() function in DataObjects.
i tried this:

class ImageGalleryObject extends DataObject {
    
    static public $singular_name = _t('ImageGalleryObject.BUTTON', 'Picture');
    static public $plural_name = _t('ImageGalleryObject.BUTTONS', 'Pictures');
    
   ...

}

But it doesn't work. i get a 'Internal Server Error'.

the translations are right set.

Where is the Problem?