function view::init_localization

3.x 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 2081
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)) {
    $this->localization_plugin = views_get_plugin('localization', 'none');
    return FALSE;
  }

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

  return $this->localization_plugin->translate;
}