You are here

function i18n_string_update in Internationalization 7

Update / create translation source for user defined strings.

Parameters

$name: Array or string concatenated with ':' that contains textgroup and string context

$string: Source string in default language. Default language may or may not be English. Array of key => string to update multiple strings at once

$options: Array with additional options:

  • 'format', String format if the string has text format
  • 'messages', Whether to print out status messages
6 calls to i18n_string_update()
i18nStringTestCase::testCaching in i18n_string/i18n_string.test
Test base i18n_string caching.
i18nStringTestCase::testStringsAPI in i18n_string/i18n_string.test
Test base i18n_string API
i18n_block_update_strings in i18n_block/i18n_block.module
Update block strings
i18n_string in ./i18n.module
Translate or update user defined string. Entry point for i18n_string API if enabled.
i18n_string_refresh_string_list in i18n_string/i18n_string.admin.inc
Refresh string list

... See full list

1 string reference to 'i18n_string_update'
i18n_string in ./i18n.module
Translate or update user defined string. Entry point for i18n_string API if enabled.

File

i18n_string/i18n_string.module, line 348
Internationalization (i18n) package - translatable strings.

Code

function i18n_string_update($name, $string, $options = array()) {
  if (is_array($string)) {
    return i18n_string_multiple('update', $name, $string, $options);
  }
  else {
    list($textgroup, $context) = i18n_string_context($name);
    return i18n_string_textgroup($textgroup)
      ->context_update($context, $string, $options);
  }
}