static function Helpers::calendar_systems_langauges in Calendar Systems 8.2
Internal helper to get all active languages.
Return value
An array of active languages.
1 call to Helpers::calendar_systems_langauges()
- AdminSettings::buildForm in src/
Form/ AdminSettings.php - Form constructor.
File
- src/
Helpers.php, line 152 - Contains \Drupal\calendar_systems.
Class
Namespace
Drupal\calendar_systemsCode
static function calendar_systems_langauges() {
// Default:
$languages['default'] = array(
'name' => 'Default',
);
// Check if there's any additional locale available:
$locales = function_exists('locale_language_list') ? locale_language_list('name', TRUE) : NULL;
// If found, append 'em:
if (!is_null($locales)) {
foreach ($locales as $name => $title) {
$languages[$name] = array(
'name' => $title,
);
}
}
return $languages;
}