You are here

function i18nviews_plugin_localization_i18nstrings::save_string in Internationalization Views 7.3

Save a string for translation

Parameters

$string: The string to be translated.

$keys: An array of keys to identify the string. Generally constructed from view name, display_id, and a property, e.g., 'header'.

$format: The input format of the string. This is optional.

Overrides views_plugin_localization::save_string

File

includes/i18nviews_plugin_localization_i18nstrings.inc, line 42
Contains the i18nstrings localization plugin.

Class

i18nviews_plugin_localization_i18nstrings
Localization plugin to pass translatable strings through i18n_string().

Code

function save_string($string, $keys = array(), $format = '') {
  $options = array();
  $options['format'] = $format ? $format : I18N_STRING_FILTER_XSS_ADMIN;
  i18n_string_update($this
    ->stringid($keys), $string, $options);
}