From fcbed87b206afaabd5874762720439b2830f6ef8 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 24 Mar 2013 20:08:18 +0400 Subject: [PATCH] localized_js: add ngettext --- localized_js.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/localized_js.php b/localized_js.php index 46dbe296..3e1c31e5 100644 --- a/localized_js.php +++ b/localized_js.php @@ -30,6 +30,10 @@ function __(msg) { } } +function ngettext(msg1, msg2, n) { + return (parseInt(n) > 1) ? msg2 : msg1; +} +