You are here

function i18nstrings_update_object in Internationalization 6

Update / create object properties.

3 calls to i18nstrings_update_object()
i18nprofile_field_form_submit in i18nprofile/i18nprofile.module
Process profile_field_form submissions.
i18nprofile_locale_refresh in i18nprofile/i18nprofile.module
Refresh strings.
i18nprofile_update_2 in i18nprofile/i18nprofile.install
Drop old table and fields.

File

i18nstrings/i18nstrings.module, line 364
Internationalization (i18n) package - translatable strings.

Code

function i18nstrings_update_object($context, $object, $properties = array()) {
  $context = i18nstrings_context($context);
  foreach ($properties as $property) {
    $context->property = $property;
    $context->location = i18nstrings_location($context);
    if (!empty($object->{$property})) {
      i18nstrings_update_string($context, $object->{$property});
    }
  }
}