From faf1828ddb9fedb8143c99efb725b0857416b387 Mon Sep 17 00:00:00 2001 From: Henry Snoek Date: Tue, 19 Jan 2016 21:24:56 +0100 Subject: [PATCH] use `getCatalogue()` instead of deprecated `getMessages()` --- components/translation/usage.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/translation/usage.rst b/components/translation/usage.rst index 04607ed4de7..2562b212614 100644 --- a/components/translation/usage.rst +++ b/components/translation/usage.rst @@ -379,7 +379,8 @@ In case you want to use the same translation catalogue outside your application (e.g. use translation on the client side), it's possible to fetch raw translation messages. Just specify the required locale:: - $messages = $translator->getMessages('fr_FR'); + $catalogue = $translator->getCatalogue('fr_FR'); + $messages = $catalogue->all(); The ``$messages`` variable will have the following structure:: @@ -392,3 +393,4 @@ The ``$messages`` variable will have the following structure:: 'Value is too long' => 'Valeur est trop long', ), ); +