Views title translation

You cannot translatea view's title out of the box.
There is howewer a simple solution

In your module, juste use this code, and every views title will then be translatable :

function MODULE_views_pre_render(&$view)  {
  $view->set_title(t($view->get_title()));
}

or in your theme's template.php file : 

function THEME_views_pre_render(&$view)  {
  $view->set_title(t($view->get_title()));
}

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.