Skip to content

Commit b6cd3e9

Browse files
wouterjweaverryan
authored andcommitted
updated new article
1 parent 5a3ff92 commit b6cd3e9

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

components/map.rst.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
* :doc:`/components/translation/index`
119119

120120
* :doc:`/components/translation/introduction`
121+
* :doc:`/components/translation/usage`
121122

122123
* :doc:`/components/yaml/index`
123124

components/translation/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ Translation
55
:maxdepth: 2
66

77
introduction
8+
usage

components/translation/usage.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Usage
2-
-----
2+
=====
33

44
Imagine you want to translate the string *"Symfony2 is great"* into french::
55

@@ -20,7 +20,7 @@ the locale set in the constructor (``fr_FR``) if the message exists in one of
2020
the message catalogues.
2121

2222
Message Placeholders
23-
~~~~~~~~~~~~~~~~~~~~
23+
--------------------
2424

2525
Sometimes, a message containing a variable needs to be translated::
2626

@@ -90,7 +90,7 @@ The second step is done by creating message catalogues that define the translati
9090
for any number of different locales.
9191

9292
Creating Translations
93-
---------------------
93+
=====================
9494

9595
The act of creating translation files is an important part of "localization"
9696
(often abbreviated `L10n`_). Translation files consist of a series of
@@ -216,7 +216,7 @@ recommended format. These files are parsed by one of the loader classes.
216216
);
217217
218218
Pluralization
219-
~~~~~~~~~~~~~
219+
-------------
220220

221221
Message pluralization is a tough topic as the rules can be quite complex. For
222222
instance, here is the mathematic representation of the Russian pluralization
@@ -294,7 +294,7 @@ same in the original message as in the translated one.
294294
only get a string based on its position in the string).
295295

296296
Explicit Interval Pluralization
297-
...............................
297+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
298298

299299
The easiest way to pluralize a message is to let the Translator use internal
300300
logic to choose which string to use based on a given number. Sometimes, you'll
@@ -342,7 +342,7 @@ delimiter can be ``[`` (exclusive) or ``]`` (inclusive). Beside numbers, you
342342
.. _using-message-domains:
343343

344344
Using Message Domains
345-
---------------------
345+
=====================
346346

347347
As you've seen, message files are organized into the different locales that
348348
they translate. The message files can also be organized further into "domains".
@@ -369,7 +369,7 @@ specified locale.
369369
can use ``-Inf`` and ``+Inf`` for the infinite.
370370

371371
Forcing the Translator Locale
372-
-----------------------------
372+
=============================
373373

374374
When translating a message, the Translator uses the specified locale or the
375375
``fallback`` locale if necessary. You can also manually specify the locale to

0 commit comments

Comments
 (0)