eeed895ebb20e43934d5afe3dda0d9d61045872b
[squirrelmail.git] / ngettext.php
1 <?php
2
3 /**
4 * SquirrelMail Test Plugin
5 *
6 * This page tests the ngettext() function.
7 *
8 * @copyright &copy; 2006 The SquirrelMail Project Team
9 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
10 * @version $Id$
11 * @package plugins
12 * @subpackage test
13 */
14
15 include_once('../../include/init.php');
16
17 global $oTemplate, $color;
18
19 displayPageHeader($color, '');
20
21 sq_change_text_domain('test');
22
23 // NOTE: Not bothering to "templatize" the following output, since
24 // this plugin is merely an administrative (and not user-facing)
25 // tool. If this is really important to you, please help by
26 // submitting the work to the team.
27
28 ?>
29 <strong>ngettext Test Strings:</strong>
30
31 <p>The results of this test depend on your current language (translation) selection (see Options ==> Display Preferences) and the corresponding translation strings in locale/xx/LC_MESSAGES/test.mo</p>
32
33 <pre>
34
35 <?php
36
37 for ($i = -10 ; $i <= 250 ; $i++) {
38 echo sprintf(ngettext("%s squirrel is on the tree.", "%s squirrels are on the tree.", $i), $i);
39 echo "\n";
40 }
41
42 echo "</pre>";
43
44 sq_change_text_domain('squirrelmail');
45 $oTemplate->display('footer.tpl');
46
47