note 115496 added to messageformatter.setpattern
| From: | neil dot smith at vouchercloud dot com | Date: | Tue, 05 Aug 2014 12:29:36 +0000 |
| Subject: | note 115496 added to messageformatter.setpattern | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-200119@lists.php.net to get a copy of this message | ||
A correct example would be to transpose the placeholders in pattern 2.
This is typical where changing messages from one language to another changes the word order, to
result in a sensible translation.
Let's imagine it's localised as Spanish or Russian instead of English.
So really you want to have pattern 2 provided by your human translator to read like this :
New pattern: '{1,number} trees hosting {0,number} monkeys'
Formatted number: 456 trees hosting 123 monkeys
That is - the order of arguments is always the same, but your translated message content has the
placeholders transposed for non English languages.
----
Server IP: 72.52.91.14
Probable Submitter: 89.197.2.242
----
Manual Page -- http://php.net/manual/en/messageformatter.setpattern.php
Edit -- https://master.php.net/note/edit/115496
Del: integrated -- https://master.php.net/note/delete/115496/integrated
Del: useless -- https://master.php.net/note/delete/115496/useless
Del: bad code -- https://master.php.net/note/delete/115496/bad+code
Del: spam -- https://master.php.net/note/delete/115496/spam
Del: non-english -- https://master.php.net/note/delete/115496/non-english
Del: in docs -- https://master.php.net/note/delete/115496/in+docs
Del: other reasons-- https://master.php.net/note/delete/115496
Reject -- https://master.php.net/note/reject/115496
Search -- https://master.php.net/manage/user-notes.php