How to translate the filter labels and table view labels of views
GiorgosK - March 22, 2007 - 00:04
| Project: | Views |
| Version: | 5.x-1.6 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I am not sure if such a solution exist
I would not mind if anyone pointed at me a temporary solution I could implement
I was thinking in terms of the lines of wrapping "labels" in t()s write before they are output to the screen
but I don't know where to look
Thanks

#1
I found myself a hack if anybody else is interested
added
//around line 790 views.module
$arg['label'] = t($arg['label']); /*added this line*/
$view->field[] = $arg;
//around line 824
$arg['label'] = t($arg['label']); /*added this line*/
$view->exposed_filter[] = $arg;
so that labels are passed to the locale strings
I don't know if it qualifies for a change to be included in views
but it works getting the labels of the "table view" and the "exposed filters" to be translatable
still if their is an official solution I would love to hear about it
#2
For table headers, look at my post to solve this without hacking anything. This works for table headers in general and therefore for views 1.6 as well.
#3
Confirmed as working hack for 5.x-1.6, line numbers aren't correct anymore. Please apply this (or similar functionality) to the module. Its badly needed.
Thanks,
Kees
#4
I hope nobody's complaining filing this as a featur request?
#5
If you post a proper patch, it might be considered for 1.7.