function view::init_localization
Same name in other branches
- 7.x-3.x 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
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;
}