public function i18n_translation_set::save_translations in Internationalization 7
Save translations in this translation set
2 calls to i18n_translation_set::save_translations()
- i18n_translation_set::insert in i18n_translation/
i18n_translation.inc - Create a new translation set
- i18n_translation_set::update in i18n_translation/
i18n_translation.inc - Update a translation set
1 method overrides i18n_translation_set::save_translations()
- i18n_path_translation_set::save_translations in i18n_path/
i18n_path.inc - Save all path translations
File
- i18n_translation/
i18n_translation.inc, line 147 - Internationalization (i18n) module - Translation set
Class
- i18n_translation_set
- @file Internationalization (i18n) module - Translation set
Code
public function save_translations() {
if (($table = $this
->get_table()) && ($field = $this
->get_field())) {
if ($keys = $this
->get_translations_keys()) {
return db_update($table)
->fields(array(
$field => $this->tsid,
))
->condition($this
->key_field(), $keys)
->execute();
}
else {
return $this
->delete_translations();
}
}
}