public function i18n_string_object::set_string in Internationalization 7
Set source string
Parameters
$string: Plain string or array with 'string', 'format', etc...
File
- i18n_string/
i18n_string.inc, line 143 - API for internationalization strings
Class
- i18n_string_object
- String object that contains source and translations.
Code
public function set_string($string) {
if (is_array($string)) {
$this->string = isset($string['string']) ? $string['string'] : NULL;
if (isset($string['format'])) {
$this->format = $string['format'];
}
if (isset($string['title'])) {
$this->title = $string['title'];
}
}
else {
$this->string = $string;
}
return $this;
}