diff --git a/src/Model/Multilingual.php b/src/Model/Multilingual.php index cd3cb05..4f8bbfb 100644 --- a/src/Model/Multilingual.php +++ b/src/Model/Multilingual.php @@ -46,6 +46,11 @@ public function getAlias($language, $aliasColumnName = 'alias') { // Do not load any translation if already target language $langColumn = static::getLangColumn(); + $fallbackLang = static::getFallbackLanguage(); + + if ($language === $fallbackLang && $this->{$langColumn} === '') { + return $this->{$aliasColumnName}; + } if ($language === $this->{$langColumn}) { return $this->{$aliasColumnName}; @@ -56,8 +61,6 @@ public function getAlias($language, $aliasColumnName = 'alias') if (null === $translatedModel) { // Get fallback - $fallbackLang = static::getFallbackLanguage(); - if ($language === $fallbackLang) { return $this->{$aliasColumnName}; }