@@ -226,7 +226,7 @@ Usage of this string is the same as with variables and select::
226
226
227
227
You can also set an ``offset `` variable to determine whether the
228
228
pluralization should be offset (e.g. in sentences like ``You and # other people ``
229
- / ``You and # other person ``).
229
+ / ``You and # other person ``).
230
230
231
231
.. tip ::
232
232
@@ -235,23 +235,23 @@ Usage of this string is the same as with variables and select::
235
235
236
236
.. code-block :: text
237
237
238
- {gender_of_host, select,
238
+ {gender_of_host, select,
239
239
female {
240
- {num_guests, plural, offset:1
240
+ {num_guests, plural, offset:1
241
241
=0 {{host} does not give a party.}
242
242
=1 {{host} invites {guest} to her party.}
243
243
=2 {{host} invites {guest} and one other person to her party.}
244
244
other {{host} invites {guest} and # other people to her party.}}
245
245
}
246
246
male {
247
- {num_guests, plural, offset:1
247
+ {num_guests, plural, offset:1
248
248
=0 {{host} does not give a party.}
249
249
=1 {{host} invites {guest} to his party.}
250
250
=2 {{host} invites {guest} and one other person to his party.}
251
251
other {{host} invites {guest} and # other people to his party.}}
252
252
}
253
253
other {
254
- {num_guests, plural, offset:1
254
+ {num_guests, plural, offset:1
255
255
=0 {{host} does not give a party.}
256
256
=1 {{host} invites {guest} to their party.}
257
257
=2 {{host} invites {guest} and one other person to their party.}
@@ -373,9 +373,8 @@ using the :phpclass:`IntlDateFormatter`:
373
373
];
374
374
375
375
The "function statement" for the ``time `` and ``date `` functions can be one of
376
- short, medium, long or full, as documented on PHP.net.
377
-
378
- .. code-block :: php
376
+ ``short ``, ``medium ``, ``long `` or ``full ``, which correspond to the
377
+ `constants defined by the IntlDateFormatter class `_::
379
378
380
379
// prints "Published at Jan 25, 2019 - 11:30 AM"
381
380
echo $translator->trans('published_at', ['publication_date' => new \DateTime('2019-01-25 11:30:00')]);
@@ -437,3 +436,4 @@ The ``number`` formatter allows you to format numbers using Intl's :phpclass:`Nu
437
436
.. _`ICU MessageFormat` : http://userguide.icu-project.org/formatparse/messages
438
437
.. _`switch statement` : https://php.net/control-structures.switch
439
438
.. _`Language Plural Rules` : http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html
439
+ .. _`constants defined by the IntlDateFormatter class` : https://php.net/manual/en/class.intldateformatter.php
0 commit comments