You are here

function i18nviews_plugin_localization_i18nstrings::translate_string in Internationalization Views 7.3

Same name and namespace in other branches
  1. 6.3 includes/i18nviews_plugin_localization_i18nstrings.inc \i18nviews_plugin_localization_i18nstrings::translate_string()

Translate a string.

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::translate_string

File

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

Class

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

Code

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