You are here

function _sbp_paths_update_translation in Search by Page 7

Same name and namespace in other branches
  1. 6 sbp_paths.module \_sbp_paths_update_translation()

Updates the strings to be translated for one path record.

Parameters

$vals: Associative array of information from sbpp_path table.

2 calls to _sbp_paths_update_translation()
sbp_paths_edit_form_submit in ./sbp_paths.module
Submit callback for sbp_paths_edit_form().
_sbp_paths_refresh_all_translations in ./sbp_paths.module
Refreshes all path info translations.

File

./sbp_paths.module, line 559
Module file for Search by Page Paths, a sub-module for Search by Page.

Code

function _sbp_paths_update_translation($vals) {
  if (module_exists('i18n_string') && $vals['pid']) {
    $code = 'sbp_paths:path:' . $vals['pid'] . ':';
    i18n_string_update($code . 'title', $vals['title']);
    i18n_string_update($code . 'type', $vals['type']);
    $snip = drupal_strtolower($vals['snippet']);
    if ($snip != 'yes' && $snip != 'no') {
      i18n_string_update($code . 'snippet', $vals['snippet']);
    }
  }
}