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

GiorgosK - March 22, 2007 - 03:55

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

omo - November 26, 2007 - 13:12

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

kees@qrios - November 30, 2007 - 07:41
Version:5.x-1.5» 5.x-1.6

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

kees@qrios - November 30, 2007 - 07:42
Category:support request» feature request

I hope nobody's complaining filing this as a featur request?

#5

sun - September 21, 2008 - 00:58

If you post a proper patch, it might be considered for 1.7.

 
 

Drupal is a registered trademark of Dries Buytaert.