Skip to content

Commit

Permalink
Fixed name of the Twig filter transchoice
Browse files Browse the repository at this point in the history
  • Loading branch information
WebVPF authored Feb 13, 2024
1 parent ce91195 commit 6da9ac8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions markup/filters/trans.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ Replacing parameters in translation strings is possible by passing an array as t
The `trans_choice` function is used to process pluralized values.

```twig
{{ 'There is one snowflake|There are many snowflakes' | trans_choice(7) }}
{{ 'There is one snowflake|There are many snowflakes' | transchoice(7) }}
```

The second argument can contain the parameters.

```twig
{{ '{1} :value minute ago|[2,*] :value minutes ago' | trans_choice(5, { value: 5 }) }}
{{ '{1} :value minute ago|[2,*] :value minutes ago' | transchoice(5, { value: 5 }) }}
```

0 comments on commit 6da9ac8

Please sign in to comment.