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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Change "Go" to "Search" for search button.


Go to End


4 Posts   1646 Views

Avatar
micahsheets

Community Member, 165 Posts

21 December 2010 at 12:20pm

I know that there is some way to do this using the translatable code but that seems like a hack to me. I would rather just have control over the text directly. I am using SS 2.4.3 but I tried to just use the old way of creating my own instance of a SearchField but I get errors when I try to submit it.

Avatar
dhensby

Community Member, 253 Posts

21 December 2010 at 12:57pm

Its *meant* to be done via a custom translatable file... Otherwise you modify the core or you have to redundantly replace it.

The point of the _t function is so you can do exactly what you're asking to do.

Avatar
micahsheets

Community Member, 165 Posts

22 December 2010 at 8:52am

I see what you mean however I don't see the logic in use a system meant for localization to be used to change the text of something when there is only one localization and it should be the default. Localization is only used when you have more than one and need to change the default to another language. So I can certainly do it that way but it is still a hack in my opinion.

Avatar
ambient

Community Member, 130 Posts

13 August 2011 at 4:05am

In case anyone is looking for a solution to changing 'go' to Other Text or an image this worked for me:

In en_US.php or your relevent language file change line 689(approx) -

$lang['en_US']['SearchForm']['GO'] = 'Go';

to
 $lang['en_US']['SearchForm']['GO'] = 'Other Text';

or
$lang['en_US']['SearchForm']['GO'] = '';

if you want to add an image instead using background-image in .search form input.action in the search css