File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -371,3 +371,25 @@ use for translation::
371
371
372
372
.. _`L10n` : http://en.wikipedia.org/wiki/Internationalization_and_localization
373
373
.. _`ISO 31-11` : http://en.wikipedia.org/wiki/Interval_(mathematics)#Notations_for_intervals
374
+
375
+ Retrieving the Message Catalogue
376
+ --------------------------------
377
+
378
+ In case you want to use the same translation catalogue outside your application
379
+ (e.g. use translation on a client side), it's possible to fetch raw translation messages.
380
+ You just need to specify required locale::
381
+
382
+ $messages = $translator->getMessages('fr_FR');
383
+
384
+ ``$messages `` will have the following structure::
385
+
386
+ array(
387
+ 'messages' => array(
388
+ 'Hello world' => 'Bonjour tout le monde',
389
+ ),
390
+ 'validators' => array(
391
+ 'Value should not be empty' => 'Valeur ne doit pas être vide',
392
+ 'Value is too long' => 'Valeur est trop long',
393
+ ),
394
+ );
395
+
You can’t perform that action at this time.
0 commit comments