Categories

(83)
(69)
(8)
(34)
(74)
(149)

Note: translation <Any> line in views filters

04.03.2011
Note: translation <Any> line in views filters
Author:

What’s the question?

Web developers have asked me many times how to translate element <Any> in drop-down list in filter of views module.

Yes! It can’t be done in a standard way by interface translation.

Why?

The secret is in views_handler_filter.inc file.

$any_label = variable_get('views_exposed_filter_any_label', 'old_any') == 'old_any' ? '<Any>' : t('- Any -');

Decision option. 

First, the most popular and inaccurate method because module must hack (people don’t think of the kittens!): 

Second option, to add a line into settings.php:

$conf['views_exposed_filter_any_label'] = 'new_label';

After that, go to interface translation and look for it :)

7 votes, Rating: 5

Read also

1

What’s CDN? Content Delivery Network or Content Distribution Network, CDN – geographically distributed network infrastructure which allows optimizing delivery and distribution of content to the...

2

The founders and developers of MySQL resigned from their native company which belongs to Oracle (once Sun consumed MySQL and later Oracle consumed Sun).

3

Profiling – is a process of work analysis of application for data acquisition about efficiency (acquisition of set of characteristics – CPU times, memory usage and resources processing, number of...

4

Sooner or later every developer comes across the situation when site “goes down” and it must be “got back to life”. The reasons for that may be diverse.

5

Probably everybody has come across with ready-to-use site packages on Drupal where after installation you get a ready site with the set of necessary modules, personal theme and so on. There are...

Subscribe to our blog updates