From baefccb502eebf8411513622cddea7036c59755f Mon Sep 17 00:00:00 2001 From: umpirsky Date: Mon, 10 Jan 2011 09:19:12 +0100 Subject: [PATCH] This typo can cause confusion if one copy pastes code from the tutorial, he can run into dificulties because strings are similar but not identical, and translation will not work. --- guides/translation.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/guides/translation.rst b/guides/translation.rst index 194d0f8a0f2..6bf6ecb922e 100644 --- a/guides/translation.rst +++ b/guides/translation.rst @@ -62,7 +62,7 @@ Translations are available through the ``translator`` service :method:`Symfony\\Component\\Translation\\Translator::trans` method to translate a message:: - $t = $this->get('translator')->trans('Symfony2 is great!'); + $t = $this->get('translator')->trans('Symfony2 is great'); If you have placeholders in strings, pass their values as the second argument:: @@ -76,7 +76,7 @@ If you have placeholders in strings, pass their values as the second argument:: By default, the translator looks for messages in the default ``messages`` domain. Override it via the third argument:: - $t = $this->get('translator')->trans('Symfony2 is great!', array(), 'applications'); + $t = $this->get('translator')->trans('Symfony2 is great', array(), 'applications'); Catalogues ---------- @@ -303,7 +303,7 @@ The translator service is accessible in PHP templates through the .. code-block:: html+php - trans('Symfony2 is great!') ?> + trans('Symfony2 is great') ?> transChoice( '{0} There is no apples|{1} There is one apple|]1,Inf[ There are {{ count }} apples', @@ -319,7 +319,7 @@ with message translation: .. code-block:: jinja - {% trans "Symfony2 is great!" %} + {% trans "Symfony2 is great" %} {% trans %} Foo {{ name }} pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy