@@ -100,10 +100,10 @@ typical usage of this is gender:
100
100
# the 'other' key is required, and is selected if no other case matches
101
101
invitation_title : >-
102
102
{organizer_gender, select,
103
- female {{organizer_name} has invited you to her party!}
104
- male {{organizer_name} has invited you to his party!}
105
- multi {{organizer_name} have invited you to their party!}
106
- other {{organizer_name} has invited you to their party!}
103
+ female {{organizer_name} has invited you to her party!}
104
+ male {{organizer_name} has invited you to his party!}
105
+ multiple {{organizer_name} have invited you to their party!}
106
+ other {{organizer_name} has invited you to their party!}
107
107
}
108
108
109
109
.. code-block :: xml
@@ -117,10 +117,10 @@ typical usage of this is gender:
117
117
<source >invitation_title</source >
118
118
<!-- the 'other' key is required, and is selected if no other case matches -->
119
119
<target >{organizer_gender, select,
120
- female {{organizer_name} has invited you to her party!}
121
- male {{organizer_name} has invited you to his party!}
122
- multi {{organizer_name} have invited you to their party!}
123
- other {{organizer_name} has invited you to their party!}
120
+ female {{organizer_name} has invited you to her party!}
121
+ male {{organizer_name} has invited you to his party!}
122
+ multiple {{organizer_name} have invited you to their party!}
123
+ other {{organizer_name} has invited you to their party!}
124
124
}</target >
125
125
</trans-unit >
126
126
</body >
@@ -133,10 +133,10 @@ typical usage of this is gender:
133
133
return [
134
134
// the 'other' key is required, and is selected if no other case matches
135
135
'invitation_title' => '{organizer_gender, select,
136
- female {{organizer_name} has invited you to her party!}
137
- male {{organizer_name} has invited you to his party!}
138
- multi {{organizer_name} have invited you to their party!}
139
- other {{organizer_name} has invited you to their party!}
136
+ female {{organizer_name} has invited you to her party!}
137
+ male {{organizer_name} has invited you to his party!}
138
+ multiple {{organizer_name} have invited you to their party!}
139
+ other {{organizer_name} has invited you to their party!}
140
140
}',
141
141
];
142
142
@@ -155,12 +155,12 @@ select. This function is applied over the ``organizer_gender`` variable::
155
155
// prints "John & Jane have invited you to their party!"
156
156
echo $translator->trans('invitation_title', [
157
157
'organizer_name' => 'John & Jane',
158
- 'organizer_gender' => 'multi ',
158
+ 'organizer_gender' => 'multiple ',
159
159
]);
160
160
161
- // prints "McDonalds has invited you to their party!"
161
+ // prints "ACME Company has invited you to their party!"
162
162
echo $translator->trans('invitation_title', [
163
- 'organizer_name' => 'McDonalds ',
163
+ 'organizer_name' => 'ACME Company ',
164
164
'organizer_gender' => 'not_applicable',
165
165
]);
166
166
@@ -179,7 +179,7 @@ you to use literal text in the select statements:
179
179
While it might seem more logical to only put ``her ``, ``his `` or ``their ``
180
180
in the switch statement, it is better to use "complex arguments" at the
181
181
outermost structure of the message. The strings are in this way better
182
- readable for translators and, as you can see in the ``multi `` case, other
182
+ readable for translators and, as you can see in the ``multiple `` case, other
183
183
parts of the sentence might be influenced by the variables.
184
184
185
185
.. tip ::
@@ -188,10 +188,10 @@ you to use literal text in the select statements:
188
188
without having to define them in any file::
189
189
190
190
$invitation = '{organizer_gender, select,
191
- female {{organizer_name} has invited you to her party!}
192
- male {{organizer_name} has invited you to his party!}
193
- multi {{organizer_name} have invited you to their party!}
194
- other {{organizer_name} has invited you to their party!}
191
+ female {{organizer_name} has invited you to her party!}
192
+ male {{organizer_name} has invited you to his party!}
193
+ multiple {{organizer_name} have invited you to their party!}
194
+ other {{organizer_name} has invited you to their party!}
195
195
}';
196
196
197
197
// prints "Ryan has invited you to his party!"
0 commit comments