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

Calling _t function within searchable array


Go to End


2 Posts   1129 Views

Avatar
ChurchDude

Community Member, 19 Posts

4 September 2011 at 4:53am

Hello,

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???

Avatar
ChurchDude

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.