Skip to content

Commit

Permalink
added information about parameters in pluralization strings
Browse files Browse the repository at this point in the history
  • Loading branch information
mputkowski committed Jan 23, 2018
1 parent 4456218 commit 7df8c26
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ 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:

'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>
## Overriding Package Language Files

Expand Down

0 comments on commit 7df8c26

Please sign in to comment.