You are here

public function EntityStructureWrapper::language in Entity API 7

Sets a new language to use for retrieving properties.

Parameters

$langcode: The language code of the language to set.

Return value

EntityWrapper

File

includes/entity.wrapper.inc, line 383
Provides wrappers allowing easy usage of the entity metadata.

Class

EntityStructureWrapper
Provides a general wrapper for any data structure. For this to work the metadata has to be passed during construction.

Code

public function language($langcode = LANGUAGE_NONE) {
  if ($langcode != $this->langcode) {
    $this->langcode = $langcode;
    $this->cache = array();
  }
  return $this;
}