_locale_prepare_predefined_list
function _locale_prepare_predefined_list
_locale_prepare_predefined_list()
Prepares the language code list for a select form item with only the unsupported ones
Related topics
File
- includes/locale.inc, line 2198
- Administration functions for locale.module.
Code
function _locale_prepare_predefined_list() { include_once DRUPAL_ROOT . '/includes/iso.inc'; $languages = language_list(); $predefined = _locale_get_predefined_list(); foreach ($predefined as $key => $value) { if (isset($languages[$key])) { unset($predefined[$key]); continue; } // Include native name in output, if possible if (count($value) > 1) { $tname = t($value[0]); $predefined[$key] = ($tname == $value[1]) ? $tname : "$tname ($value [1])"; } else { $predefined[$key] = t($value[0]); } } asort($predefined); return $predefined; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!locale.inc/function/_locale_prepare_predefined_list/7.x