function unicode_requirements in Drupal 5
Same name and namespace in other branches
- 8 core/includes/unicode.inc \unicode_requirements()
- 6 includes/unicode.inc \unicode_requirements()
- 7 includes/unicode.inc \unicode_requirements()
Return Unicode library status and errors.
1 call to unicode_requirements()
- system_requirements in modules/
system/ system.install - Test and report Drupal installation requirements.
File
- includes/
unicode.inc, line 78
Code
function unicode_requirements() {
// Ensure translations don't break at install time
$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;
}