You are here

protected function i18n_string_textgroup_default::string_translate in Internationalization 7

Translate string object

Parameters

$i18nstring: String object

$options: Array with aditional options

1 call to i18n_string_textgroup_default::string_translate()
i18n_string_textgroup_default::context_translate in i18n_string/i18n_string.inc
Translate source string

File

i18n_string/i18n_string.inc, line 540
API for internationalization strings

Class

i18n_string_textgroup_default
Textgroup handler for i18n_string API

Code

protected function string_translate($i18nstring, $options = array()) {
  $langcode = isset($options['langcode']) ? $options['langcode'] : i18n_langcode();

  // Search for existing translation (result will be cached in this function call)
  $i18nstring
    ->get_translation($langcode);
  return $i18nstring;
}