function unicode_requirements

Same name in other branches
  1. 8.9.x core/includes/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

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.