2

I have this yml translation file:

follower:
  one: 'Follower'
  other: 'Followers'

And in my twig template I have this simple statement:

{{ 'app.activity.follower'|transchoice(1) }}

Currently the output is app.activity.follower. It's possibile to divide in more range than 3(zero, one, other)?

2 Answers2

3

This is my xliff example:

        <trans-unit id="11">
            <source> app.activity.follower </source>
            <target>{0} No Follower|{1} Follower|[2,Inf] Followers</target>
        </trans-unit>

Hope this help

Matteo
  • 37,680
  • 11
  • 100
  • 115
0

An example with the yaml syntax:

app:
    activity
        follower:
            time_limit: '{0} No Follower|{1} Follower|[2,Inf] Followers'
Matteo
  • 37,680
  • 11
  • 100
  • 115