Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Translation] added method to expose collected message#3386

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
weaverryan merged 1 commit intosymfony:masterfromlaboro:master
Nov 4, 2014
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletionscomponents/translation/usage.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -371,3 +371,25 @@ use for translation::

.. _`L10n`: http://en.wikipedia.org/wiki/Internationalization_and_localization
.. _`ISO 31-11`: http://en.wikipedia.org/wiki/Interval_(mathematics)#Notations_for_intervals

Retrieving the Message Catalogue
--------------------------------

In case you want to use the same translation catalogue outside your application
(e.g. use translation on a client side), it's possible to fetch raw translation messages.
You just need to specify required locale::

$messages = $translator->getMessages('fr_FR');

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

2 duplicate lines

``$messages`` will have the following structure::

array(
'messages' => array(
'Hello world' => 'Bonjour tout le monde',
),
'validators' => array(
'Value should not be empty' => 'Valeur ne doit pas être vide',
'Value is too long' => 'Valeur est trop long',
),
);


[8]ページ先頭

©2009-2025 Movatter.jp