getDefaultLanguage(); if ($this->isDataLanguageEnabled()) { $lang = $user->getPropertyValues(GenerisRdf::PROPERTY_USER_DEFLG); $result = empty($lang) ? $this->getDefaultLanguage() : (string)current($lang); } return $result; } /** * @inheritdoc */ public function getInterfaceLanguage(User $user) { if (!empty($this->customInterfaceLanguage)) { return $this->customInterfaceLanguage; } $lang = $user->getPropertyValues(GenerisRdf::PROPERTY_USER_UILG); return empty($lang) ? $this->getDefaultLanguage() : (string)current($lang); } /** * @inheritdoc */ public function isDataLanguageEnabled() { return !$this->hasOption(self::OPTION_LOCK_DATA_LANGUAGE) || $this->getOption(self::OPTION_LOCK_DATA_LANGUAGE) === false; } public function getAuthoringLanguage(): string { return $this->getOption(self::OPTION_AUTHORING_LANGUAGE, $this->getDefaultLanguage()); } /** * @inheritdoc */ public function setCustomInterfaceLanguage(?string $customInterfaceLanguage): void { $this->customInterfaceLanguage = $customInterfaceLanguage; } }