You are here

public function view::is_translatable in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 includes/view.inc \view::is_translatable()

Determine whether a view supports admin string translation.

1 call to view::is_translatable()
view::process_locale_strings in includes/view.inc
Process strings for localization, deletion or export to code.

File

includes/view.inc, line 2166
views_objects Objects that represent a View or part of a view

Class

view
An object to contain all of the data to generate a view.

Code

public function is_translatable() {

  // Use translation no matter what type of view.
  if (variable_get('views_localize_all', FALSE)) {
    return TRUE;
  }

  // If the view is normal or overridden, use admin string translation.
  // A newly created view won't have a type. Accept this.
  return !isset($this->type) || in_array($this->type, array(
    t('Normal'),
    t('Overridden'),
  )) ? TRUE : FALSE;
}