// read-only. See https://www.drupal.org/node/2443991.
if (isset($this->values
[$this->defaultLangcodeKey
]) &&
$this->
get($this->defaultLangcodeKey
)->value !=
$this->
isDefaultTranslation()) { $this->
get($this->defaultLangcodeKey
)->
setValue($this->
isDefaultTranslation(), FALSE
);
$message =
new FormattableMarkup('The default translation flag cannot be changed (@langcode).',
['@langcode' =>
$this->activeLangcode
]);
throw new \
LogicException($message);
} break;
case $this->revisionTranslationAffectedKey:
// If the revision translation affected flag is being set then enforce
// its value.
$this->
setRevisionTranslationAffectedEnforced(TRUE
);
break;
} } /**
* {@inheritdoc}
*/
public function getTranslation($langcode) { // Ensure we always use the default language code when dealing with the
// original entity language.
if ($langcode != LanguageInterface::LANGCODE_DEFAULT &&
$langcode ==
$this->defaultLangcode
) {