hi guys,

i translate my view title with the following argument handling code:

$view->page_title = t($view->page_title);
return $args;

it works perfect but why this not work for menu titles?

i tryd the following

$view->menu_title = t($view->menu_title);
//and
$view->menu_title = t('SOMETHING');
return $args;

both not work. can anyone help me please?

regards

Lausch

Comments

gionnibgud’s picture

I'm having a similar issue here.
I tried altering the view just like you did but it doesn't work at all.
This is a serious problem for a multilang site.
I hope someone can help.

cheers

gionnibgud’s picture

Status: Active » Needs review

Hi Laush if you're still interested in a solution i have found something.

Please note that this method modifies the views.module file so it's really just a temporary workaround and might not work anymore if file gets overwritten during an upgrade.

On line 248 (tha's for me, line number may differ) find the function '_views_menu_item'.
Inside the function change:

'title' =>$title,

to

'title' => t($title),

After the modification i cleared the views cache even if i'm not sure that's needed.

sun’s picture

Title: how to translate my menu title? argument handling code seems wrong or not working :-( » Views menu items cannot be translated
Component: Miscellaneous » Code
Category: support » bug
Status: Needs review » Needs work

Please submit a proper patch.

esmerel’s picture

Status: Needs work » Closed (won't fix)

NO patch submitted, nobody's working on the 1.x code line.