You are here

function finder_ui_i18n_string_save_strings in Finder 7.2

Recursively save strings using the map.

1 call to finder_ui_i18n_string_save_strings()
finder_ui_finder_presave in modules/finder_ui/finder_ui.i18n_string.inc
Implements hook_finder_presave().

File

modules/finder_ui/finder_ui.i18n_string.inc, line 128
i18n_string.inc

Code

function finder_ui_i18n_string_save_strings($object, $map) {
  if (is_array($object)) {
    $object = clone (object) $object;
  }
  if (!empty($map)) {
    foreach ($map as $key => $value) {
      if (isset($object->{$key}) && !is_numeric($object->{$key}) && is_string($value)) {
        i18n_string_update($value, $object->{$key});
      }
      if (is_array($value) && !empty($object->{$key})) {
        finder_ui_i18n_string_save_strings($object->{$key}, $value);
      }
    }
  }
}