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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Data Model Questions /

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

Calling _t function within searchable array

Go to End

2 Posts   801 Views


Community Member, 19 Posts

4 September 2011 at 4:53am


I'm a bit stuck. The following does not work.

static $searchable_fields = array('Name','City','StateProvince'=>array('title',_t('Family.STATEPROVINCE')));

How do I use my international language files to set the searchable fields title???


Community Member, 19 Posts

22 February 2012 at 2:43am

K. I have figured out my problem lies with the static declaration. Statics cannot call variables so this will not work.

Anyone have any ideas? Seems rather limiting for International needs.