You are here

function i18n_object_wrapper::translate in Internationalization 7

Translate object if translatable.

1 call to i18n_object_wrapper::translate()
i18n_object_wrapper::localize in ./i18n_object.inc
Localize object if localizable.
1 method overrides i18n_object_wrapper::translate()
i18n_string_object_wrapper::translate in i18n_string/i18n_string.inc
Translate object.

File

./i18n_object.inc, line 187
i18n Object Class

Class

i18n_object_wrapper
Object wrapper

Code

function translate($langcode, $options = array()) {
  if (isset($this->translations[$langcode])) {
    return $this->translations[$langcode];
  }
  else {
    return $this->object;
  }
}