function i18n_string_refresh_string_list in Internationalization 7
Refresh string list
3 calls to i18n_string_refresh_string_list()
- i18n_string_refresh_enabled_modules in i18n_string/
i18n_string.admin.inc - Refresh strings for enabled modules
- i18n_string_refresh_group in i18n_string/
i18n_string.admin.inc - Refresh all user defined strings for a given text group.
- _i18n_string_batch_refresh_list in i18n_string/
i18n_string.admin.inc - Batch operation: Refresh string list for group
File
- i18n_string/
i18n_string.admin.inc, line 118 - Helper functions for string administration.
Code
function i18n_string_refresh_string_list($strings) {
$count = 0;
foreach ($strings as $textgroup => $group_strings) {
foreach ($group_strings as $type => $type_strings) {
foreach ($type_strings as $id => $object_strings) {
foreach ($object_strings as $key => $string) {
if (is_array($string)) {
$format = isset($string['format']) ? $string['format'] : NULL;
$string = $string['string'];
}
else {
$format = NULL;
}
i18n_string_update(array(
$textgroup,
$type,
$id,
$key,
), $string, array(
'format' => $format,
));
$count++;
}
}
}
}
return $count;
}