]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - application/Languages.php
c8b0a25a355c2a60ffbaf33a16cb6d3d06ee1b5a
[github/shaarli/Shaarli.git] / application / Languages.php
1 <?php
2
3 /**
4 * Wrapper function for translation which match the API
5 * of gettext()/_() and ngettext().
6 *
7 * Not doing translation for now.
8 *
9 * @param string $text Text to translate.
10 * @param string $nText The plural message ID.
11 * @param int $nb The number of items for plural forms.
12 *
13 * @return String Text translated.
14 */
15 function t($text, $nText = '', $nb = 0) {
16 if (empty($nText)) {
17 return $text;
18 }
19 $actualForm = $nb > 1 ? $nText : $text;
20 return sprintf($actualForm, $nb);
21 }