You are here

public function boxes_i18n::locale_refresh in Boxes translation 6

Same name and namespace in other branches
  1. 7 plugins/boxes/boxes_i18n.inc \boxes_i18n::locale_refresh()

Refresh the translatable strings.

1 call to boxes_i18n::locale_refresh()
boxes_i18n::save in plugins/boxes/boxes_i18n.inc
Save a box.

File

plugins/boxes/boxes_i18n.inc, line 60

Class

boxes_i18n
Simple translatable custom text box.

Code

public function locale_refresh() {
  $title = '';
  $content = '';
  if ($this->options['i18n_boxes']['language'] == I18N_BOXES_LOCALIZE) {
    $content = $this->options['body'];
    $title = $this->title;
  }

  // Update or delete the i18nstrings record for the body.
  i18nstrings_update("boxes:{$this->plugin_key}:{$this->delta}:body", $content, $this->options['format']);

  // Update or delete the title, too.
  i18nstrings_update("boxes:{$this->plugin_key}:{$this->delta}:title", $title);
}