Replies: 1 comment
-
@anejjar you mean like this? // \Spatie\Translatable\HasTranslations::getTranslation(string $key, string $locale, bool $useFallbackLocale = true): mixed
$post->getTranslation('text', 'es'); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, the Spatie Translatable package uses the locale set by
config('app.locale')
for retrieving translations. However, there are scenarios where it would be beneficial to set a different locale for specific operations or parts of the application without changing the globalapp.locale
.Beta Was this translation helpful? Give feedback.
All reactions