We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e91949 commit 06ca405Copy full SHA for 06ca405
components/translation/usage.rst
@@ -376,7 +376,11 @@ In case you want to use the same translation catalogue outside your application
376
(e.g. use translation on the client side), it's possible to fetch raw translation
377
messages. Just specify the required locale::
378
379
- $messages = $translator->getMessages('fr_FR');
+ $catalogue = $translator->getCatalogue('fr_FR');
380
+ $messages = $catalogue->all();
381
+ while ($catalogue = $catalogue->getFallbackCatalogue()) {
382
+ $messages = array_replace_recursive($catalogue->all(), $messages);
383
+ }
384
385
The ``$messages`` variable will have the following structure::
386
0 commit comments