We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey guys,
The $domain param in the following functions/methods is not used:
Illuminate/Foundation/helpers.php
Illuminate/Translation/Translator.php
As per the doc, domains are declared in the key name like this trans('domain.message_key')
trans('domain.message_key')
In Translator@trans() we can clearly see this param is not used
public function trans($id, array $parameters = [], $domain = 'messages', $locale = null) { return $this->get($id, $parameters, $locale); }
Now, the thing is, this param is needed in the Translator class because it implements the Symfony\Component\Translation\TranslatorInterface.
Symfony\Component\Translation\TranslatorInterface
Maybe we could at least modify the trans() and trans_choice() helpers like this:
function trans($id = null, $parameters = [], $locale = null) { if (is_null($id)) { return app('translator'); } return app('translator')->trans($id, $parameters, null, $locale); } function trans_choice($id, $number, array $parameters = [], $locale = null) { return app('translator')->transChoice($id, $number, $parameters, $locale); }
but it would still be confusing for people dealing with the translator class directly.
Any thoughts?
The text was updated successfully, but these errors were encountered:
We can't remove that param as that would be a breaking chanage, sorry.
Sorry, something went wrong.
Yep I know, but isn't it possible to do this change for 5.2?
Please send a PR then. Proposal issues aren't much use to us, sorry.
No branches or pull requests
Hey guys,
The $domain param in the following functions/methods is not used:
Illuminate/Foundation/helpers.php
Illuminate/Translation/Translator.php
As per the doc, domains are declared in the key name like this
trans('domain.message_key')
In Translator@trans() we can clearly see this param is not used
Now, the thing is, this param is needed in the Translator class because it implements the
Symfony\Component\Translation\TranslatorInterface
.Maybe we could at least modify the trans() and trans_choice() helpers like this:
but it would still be confusing for people dealing with the translator class directly.
Any thoughts?
The text was updated successfully, but these errors were encountered: