Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jan 24, 2018
1 parent 02a125d commit eb3872a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,10 @@ After defining a translation string that has pluralization options, you may use

echo trans_choice('messages.apples', 10);

You may also define parameters in translation string:
You may also define place-holder attributes in pluralization strings. These place-holders may be replaced by passing an array as the third argument to the `trans_choice` function:

'minutes_ago' => '{1} :value minute ago|[2,*] :value minutes ago',

Array of replacements should be passed as third argument of `trans_choice` function:

echo trans_choice('time.minutes_ago', 5, ['value' => 5]);

<a name="overriding-package-language-files"></a>
Expand Down

0 comments on commit eb3872a

Please sign in to comment.