Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
ccb0452a
Commit
ccb0452a
authored
Mar 26, 2012
by
Benoit Pointet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed doc
parent
c57aeab6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
doc/providers/translation.rst
doc/providers/translation.rst
+4
-4
No files found.
doc/providers/translation.rst
View file @
ccb0452a
...
@@ -141,16 +141,16 @@ Finally override the ``translator.loader`` to use a ``XliffFileLoader``::
...
@@ -141,16 +141,16 @@ Finally override the ``translator.loader`` to use a ``XliffFileLoader``::
That's it.
That's it.
A
dd
ing translations in Twig templates
A
ccess
ing translations in Twig templates
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
Once loaded, the translation service provider is available from within Twig templates:
Once loaded, the translation service provider is available from within Twig templates:
.. code-block:: jinja
.. code-block:: jinja
{{ app.translator.trans('translation_key') }}
{{ app.translator.trans('translation_key') }}
Even better: register the
SymfonyBridgesServiceProvider
and you will get
Even better: register the
:doc:`SymfonyBridgesServiceProvider <providers/symfony_bridges>`
and you will get
the TranslationExtension of the bridge allowing you to translate
th
ings in
the TranslationExtension of the bridge allowing you to translate
str
ings in
the Twig way:
the Twig way:
.. code-block:: jinja
.. code-block:: jinja
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment