You are here

function view::init_localization in Views (for Drupal 7) 6.3

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

Find and initialize the localizer plugin.

2 calls to view::init_localization()
view::export in includes/view.inc
Export a view as PHP code.
view::process_locale_strings in includes/view.inc
Process strings for localization, deletion or export to code.

File

includes/view.inc, line 1908
view.inc Provides the view object type and associated methods.

Class

view
An object to contain all of the data to generate a view, plus the member functions to build the view query, execute the query and render the output.

Code

function init_localization() {
  if (isset($this->localization_plugin) && is_object($this->localization_plugin)) {
    return TRUE;
  }
  $this->localization_plugin = views_get_plugin('localization', views_get_localization_plugin());
  if (empty($this->localization_plugin)) {
    return FALSE;
  }

  /**
   * Figure out whether there should be options.
   */
  $this->localization_plugin
    ->init($this);
  return $this->localization_plugin->translate;
}