You are here

function i18nstrings_update_string in Internationalization 6

Update / create / remove string.

@pram $string New value of string for update/create. May be empty for removing.

Parameters

$context: String context.

$format: Input format, that must have been checked against allowed formats for translation

Return value

status SAVED_UPDATED | SAVED_NEW | SAVED_DELETED

4 calls to i18nstrings_update_string()
i18nmenu_menu_edit_menu_submit in i18nmenu/i18nmenu.module
Submit handler for the menu_edit_item form.
i18nstrings_ts in i18nstrings/i18nstrings.module
Get configurable string.
i18nstrings_update in i18nstrings/i18nstrings.module
Update / create translation source for user defined strings.
i18nstrings_update_object in i18nstrings/i18nstrings.module
Update / create object properties.

File

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

Code

function i18nstrings_update_string($context, $string, $format = 0) {
  $context = i18nstrings_context($context, $string, $format);
  if ($string) {
    return i18nstrings_add_string($context, $string, $format);
  }
  else {
    return i18nstrings_remove_string($context);
  }
}