Implements \Drupal\Component\Plugin\Derivative\DerivativeInterface::getDerivativeDefinitions().
Overrides DerivativeInterface::getDerivativeDefinitions
public function getDerivativeDefinitions(array $base_plugin_definition) {
include_once DRUPAL_ROOT . '/core/includes/language.inc';
$info = language_types_info();
foreach (language_types_get_configurable(FALSE) as $type) {
$this->derivatives[$type] = $base_plugin_definition;
$this->derivatives[$type]['admin_label'] = t('Language switcher (!type)', array(
'!type' => $info[$type]['name'],
));
$this->derivatives[$type]['cache'] = DRUPAL_NO_CACHE;
}
return $this->derivatives;
}