-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
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
[Translation] Add a way to retrieve the message catalogue from the translator #2435
Comments
The TranslatorInterface does not need to know how translation works. Furthermore, catalogues are lazy-loaded. So, there is in fact no way to get all catalogues. What we could do is add a getter for the resources, which are used to create the catalogues. Would that be useful? |
What I need is the raw translation message (with placeholders): |
any news about it ? |
I'm using reflection for now, but still think that this would be useful. |
+1 |
re #8597 |
@fabpot the getter must not be added to the And if the getter takes a (optional) parameter for the locale (e.g. |
This issue should get a hasPR label |
…(Grygir) This PR was merged into the 2.6-dev branch. Discussion ---------- [Translation] added method to expose collected message | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | #2435 | License | MIT | Doc PR | symfony/symfony-docs#3386 Commits ------- ef5d7c5 [Translation] added method to expose collected messages
This PR was squashed before being merged into the 2.6-dev branch (closes #10887). Discussion ---------- [Translation] added LoggingTranslator. | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #3015, #2435 | License | MIT | Doc PR | symfony/symfony-docs/pull/4050 Commits ------- b7770bc [Translation] added LoggingTranslator.
Currently, there are no getters for the message catalogues of the translator.
This would be useful for tools that need to access that information.
The text was updated successfully, but these errors were encountered: