function localize_fields_enable in Localize Fields 7
Sets a variable and warns user if i18n_field is enabled.
Implements hook_enable().
See also
localize_fields_field_flush_caches()
File
- ./
localize_fields.install, line 37 - Drupal Localize Fields module
Code
function localize_fields_enable() {
// In old versions of PHP (5.3.3) get_html_translation_table()
// doesn't reflect the actually used table by htmlspecialchars() et al.
// Observed: ' versus '
$entities_raw = array(
'"',
"'",
);
$entities_encoded = array();
foreach ($entities_raw as $entity) {
$entities_encoded[] = check_plain($entity);
}
variable_set('localize_fields_entsencoded', $entities_encoded);
}