8.5.x unicode.inc unicode_requirements()
8.0.x unicode.inc unicode_requirements()
8.1.x unicode.inc unicode_requirements()
8.2.x unicode.inc unicode_requirements()
8.3.x unicode.inc unicode_requirements()
8.4.x unicode.inc unicode_requirements()
8.6.x unicode.inc unicode_requirements()
5.x unicode.inc unicode_requirements()
6.x unicode.inc unicode_requirements()
7.x unicode.inc unicode_requirements()

Returns Unicode library status and errors.

1 call to unicode_requirements()
system_requirements in modules/system/system.install
Implements hook_requirements().

File

includes/unicode.inc, line 139
Provides Unicode-related conversions and operations.

Code

function unicode_requirements() {

  // Ensure translations don't break during installation.
  $t = get_t();
  $libraries = array(
    UNICODE_SINGLEBYTE => $t('Standard PHP'),
    UNICODE_MULTIBYTE => $t('PHP Mbstring Extension'),
    UNICODE_ERROR => $t('Error'),
  );
  $severities = array(
    UNICODE_SINGLEBYTE => REQUIREMENT_WARNING,
    UNICODE_MULTIBYTE => REQUIREMENT_OK,
    UNICODE_ERROR => REQUIREMENT_ERROR,
  );
  list($library, $description) = _unicode_check();
  $requirements['unicode'] = array(
    'title' => $t('Unicode library'),
    'value' => $libraries[$library],
  );
  if ($description) {
    $requirements['unicode']['description'] = $description;
  }
  $requirements['unicode']['severity'] = $severities[$library];
  return $requirements;
}