You are here

function i18n_object_wrapper::localize in Internationalization 7

Localize object if localizable.

File

./i18n_object.inc, line 175
i18n Object Class

Class

i18n_object_wrapper
Object wrapper

Code

function localize($langcode, $options = array()) {
  if ($this
    ->get_translate_mode() == I18N_MODE_LOCALIZE) {
    return $this
      ->translate($langcode, $options);
  }
  else {
    return $this->object;
  }
}