Replies: 1 comment
-
Without changing the parser, this could be easier with a flag, flattening the input so that you can do this: __("Your friend :name lives in :address and was born in :date", [
'user' => $user
], flatten: true) Sure, you could also just do this without changing anything: __("Your friend :name lives in :address and was born in :date", ...(array)$user) but with |
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.
-
I have faced situations like this a couple times now,
Very simple example, but you get the idea.
I feel like this is a lot cleaner,
I have experimented with
vendor/laravel/framework/src/Illuminate/Translation/Translator.php
and I think it would be fairly easy to implement. Before I invest time in opening a PR, Is this something people would want? Or is there another feature that kind of makes this situation better and maybe we don't need this at all 🤷♂️Beta Was this translation helpful? Give feedback.
All reactions