You are here

protected static function i18n_string_textgroup_default::save_source in Internationalization 7

Save source string (create / update)

2 calls to i18n_string_textgroup_default::save_source()
i18n_string_textgroup_default::save_string in i18n_string/i18n_string.inc
Save / update string object
i18n_string_textgroup_default::string_add in i18n_string/i18n_string.inc
Add source string to the locale tables for translation.

File

i18n_string/i18n_string.inc, line 753
API for internationalization strings

Class

i18n_string_textgroup_default
Textgroup handler for i18n_string API

Code

protected static function save_source($source) {
  if (isset($source->string)) {
    $source->source = $source->string;
  }
  if (empty($source->version)) {
    $source->version = 1;
  }
  return drupal_write_record('locales_source', $source, !empty($source->lid) ? 'lid' : array());
}