Skip to content

Commit

Permalink
add default locale
Browse files Browse the repository at this point in the history
  • Loading branch information
MoamenEltouny committed Sep 2, 2021
1 parent 97a4dbf commit 49ad420
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Traits/Actions.php
Expand Up @@ -99,7 +99,7 @@ public function translateOrNew(string $locale): Model
*/
public function translateOrDefault(string $locale = null)
{
return $this->getTranslation($locale) ?? $this->getTranslation(config('Pharaonic.translatable.default')) ?? null;
return $this->getTranslation($locale) ?? $this->getTranslation(config('Pharaonic.translatable.default', 'en')) ?? null;
}

/**
Expand Down

0 comments on commit 49ad420

Please sign in to comment.