CollectsTranslationLookups
trait CollectsTranslationLookups
| internal |
Upstream collects only the key. The missing-translation rule resolves each lookup through the booted translator, so the call's locale, fallback and operation are collected with it.
Methods
array|null
translationLookup(CallLike $call, bool $choice, bool $acceptsFallback, Scope|null $scope)
Get the lookup made by a call with a literal translation key.
array|null
translationLocales(Expr|null $locale, Scope|null $scope)
Get the locales a lookup can use, where null is the translator's current locale.
bool
translationFallback(Expr|null $fallback, Scope|null $scope)
Determine whether a lookup can use the fallback locale.
Details
at line 34
protected array|null
translationLookup(CallLike $call, bool $choice, bool $acceptsFallback, Scope|null $scope)
Get the lookup made by a call with a literal translation key.
at line 71
protected array|null
translationLocales(Expr|null $locale, Scope|null $scope)
Get the locales a lookup can use, where null is the translator's current locale.
at line 107
protected bool
translationFallback(Expr|null $fallback, Scope|null $scope)
Determine whether a lookup can use the fallback locale.
An unknown value counts as true: a translation missing with the fallback locale is also missing without it.