I'm not totally sure why the option with value "All" has the display text "" but that's beside my point. I need to change this to display "" as every client seems to make a comment about "" not really making sense.

I'm wondering what the simplest way to go about changing this hopefully just through the theme. Is there a way to do this?

I thought about doing it potentially through a module as well with hook_form_alter.

At this point I'm just going to have to modify the Views core but that just makes me feel dirty.

thanks

Comments

dawehner’s picture

you can do this anytime with using hook_form_alter of the exposed filter form or writing your own handler.

do you need more introductions?

Anonymous’s picture

I have just been looking for this.. so would be interested to have an example or at least pointers. I just set up a site for a friend, and they were saying that "Any" is not always understood by their visitors with limited Engish, and would prefere to use "All"

I did find in anothe rthread a patch which gives clues to what I am looking for in teh code if i wanted to hack it, but would rather do it the correct way, and learn in the process.

http://drupal.org/files/issues/383242-2.any_.patch

oshores’s picture

I am also looking for solution on that. as a display text always make confusing.

merlinofchaos’s picture

Status: Active » Fixed

In the Views settings (Tools tab on the Views UI) Change it from <Any> to - Any -

Then you can use the settings.php string translation (it's in the base Drupal docs) to translate that string to anything you like.

If you want to do it more targeted, you'll have to use hook_form_alter and alter views_exposed_form. You can look at $form_state['view'] to determine what view and change whichever fields you actually need changed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

edpaff’s picture

Just in case anyone else is looking for a quick solution to this issue (and doesn't mind changing the 'any' text site-wide), follow merlinofchaos's solution to change from to - Any -, and then use String Overrides to change - Any - to whatever you like.

sill’s picture

This worked for me. Thanks!

1) Just went to /admin/build/views/tools and chanced to - Any -
2) installed the String Overrides module
3) Going to the String Overrides settings (/admin/settings/stringoverrides) and adding your over-ride. In this case: - Any - and "Change to this word"

Clear cache and voila!