function finder_i18nstrings_save_strings in Finder 6
Same name and namespace in other branches
- 7 modules/finder_i18nstrings/finder_i18nstrings.module \finder_i18nstrings_save_strings()
Recursively save strings using the map.
1 call to finder_i18nstrings_save_strings()
- finder_i18nstrings_finderapi in modules/
finder_i18nstrings/ finder_i18nstrings.module - Implementation of hook_finderapi().
File
- modules/
finder_i18nstrings/ finder_i18nstrings.module, line 206 - The finder string translation module.
Code
function finder_i18nstrings_save_strings($object, $map) {
$language = language_default('language');
$object = (array) $object;
if (!empty($map)) {
foreach ($map as $key => $value) {
if (isset($object[$key]) && !is_numeric($object[$key]) && $value['#i18nstrings']) {
i18nstrings_update($value['#i18nstrings'], $object[$key], $language);
}
if (is_array($map[$key])) {
finder_i18nstrings_save_strings($object[$key], $map[$key]);
}
}
}
}