You are here

function _calendar_systems_langauges in Calendar Systems 8

Same name and namespace in other branches
  1. 7.3 calendar_systems.module \_calendar_systems_langauges()
  2. 7 calendar_systems.helpers.inc \_calendar_systems_langauges()
  3. 7.2 calendar_systems.helpers.inc \_calendar_systems_langauges()

Internal helper to get all active languages.

Return value

An array of active languages.

2 calls to _calendar_systems_langauges()
calendar_systems_profile_delete_confirm in ./calendar_systems.admin.inc
Form callback for profile removal confirmarion.
calendar_systems_profile_overview in ./calendar_systems.admin.inc
Form callback for calendar systems profiles.

File

./calendar_systems.helpers.inc, line 410

Code

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;
}