[support] i18n views
Ámon Tamás
amont at 5net.hu
Thu Jun 5 09:48:41 UTC 2008
This is the best solution:
function otnet_views_pre_view(&$view, &$items) {
if ($view->page_type == 'table') {
$table_header = $view->table_header;
foreach ($table_header as $curr => $val) {
if ($val['data']) {
$val['data'] = t($val['data']);
}
$view->table_header[$curr] = $val;
}
}
}
Ámon Tamás írta:
> But it does not work :(
>
> Ámon Tamás írta:
>
>> Thanks for the answer. I found an other way:
>>
>> In a module I made the following:
>>
>> function otnet_views_pre_view(&$view, &$items) {
>> if ($view->page_type == 'table') {
>> $fields = $view->field;
>> foreach ($fields as $curr => $val) {
>> $val['label'] = t($val['label']);
>> $view->field[$curr] = $val;
>> }
>> }
>> }
>> marolijo - Pol Maresma írta:
>>
>>
>>> I use to theme the Views with the views wizard and then edit the ..tpl.php to
>>> adjust my needs.
>>> Here you can control de locale with PHP
>>>
>>> See you
>>>
>>>
>>>
>>> -----Mensaje original-----
>>> De: support-bounces at drupal.org [mailto:support-bounces at drupal.org] En nombre
>>> de Ámon Tamás
>>> Enviado el: dimecres, 4 / juny / 2008 14:09
>>> Para: support at drupal.org
>>> Asunto: [support] i18n views
>>>
>>> Hello,
>>>
>>> I have a multilingual site where I use some table views. How can I translate
>>> the fields labels?
>>>
>>> Ámon Tamás
>>> Sitefejlesztő és programozó
>>> --
>>> 5NET Informatikai Kft.
>>> 1062 Budapest, Aradi utca 38. A 3/11
>>> telefon: (1) 461-0205 | fax: (1) 461-0206
>>> e-mail: amont at 5net.hu | web: http://www.5net.hu
>>>
>>> --
>>> [ Drupal support list | http://lists.drupal.org/ ]
>>>
>>> __________ Información de NOD32, revisión 3154 (20080603) __________
>>>
>>> Este mensaje ha sido analizado con NOD32 antivirus system
>>> http://www.nod32.com
>>>
>>>
>>>
>>>
>>>
>>>
>> Ámon Tamás
>> Sitefejlesztő és programozó
>>
>>
>
>
> Ámon Tamás
> Sitefejlesztő és programozó
>
Ámon Tamás
Sitefejlesztő és programozó
--
5NET Informatikai Kft.
1062 Budapest, Aradi utca 38. A 3/11
telefon: (1) 461-0205 | fax: (1) 461-0206
e-mail: amont at 5net.hu | web: http://www.5net.hu
More information about the support
mailing list